@@ -64,10 +64,7 @@ public void setUp() {
6464
6565 @ Test
6666 public void simple () {
67- DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (
68- kms ,
69- keyId
70- );
67+ DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (kms , keyId );
7168
7269 EncryptionMaterials eMat = prov .getEncryptionMaterials (ctx );
7370 SecretKey encryptionKey = eMat .getEncryptionKey ();
@@ -96,10 +93,7 @@ public void simple() {
9693
9794 @ Test
9895 public void simpleWithKmsEc () {
99- DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (
100- kms ,
101- keyId
102- );
96+ DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (kms , keyId );
10397
10498 Map <String , AttributeValue > attrVals = new HashMap <>();
10599 attrVals .put ("hk" , AttributeValue .builder ().s ("HashKeyValue" ).build ());
@@ -136,10 +130,7 @@ public void simpleWithKmsEc() {
136130
137131 @ Test
138132 public void simpleWithKmsEc2 () throws GeneralSecurityException {
139- DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (
140- kms ,
141- keyId
142- );
133+ DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (kms , keyId );
143134
144135 Map <String , AttributeValue > attrVals = new HashMap <>();
145136 attrVals .put ("hk" , AttributeValue .builder ().n ("10" ).build ());
@@ -176,10 +167,7 @@ public void simpleWithKmsEc2() throws GeneralSecurityException {
176167
177168 @ Test
178169 public void simpleWithKmsEc3 () throws GeneralSecurityException {
179- DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (
180- kms ,
181- keyId
182- );
170+ DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (kms , keyId );
183171
184172 Map <String , AttributeValue > attrVals = new HashMap <>();
185173 attrVals .put (
@@ -243,10 +231,7 @@ public void simpleWithKmsEc3() throws GeneralSecurityException {
243231
244232 @ Test
245233 public void randomEnvelopeKeys () throws GeneralSecurityException {
246- DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (
247- kms ,
248- keyId
249- );
234+ DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (kms , keyId );
250235
251236 EncryptionMaterials eMat = prov .getEncryptionMaterials (ctx );
252237 SecretKey encryptionKey = eMat .getEncryptionKey ();
@@ -264,10 +249,7 @@ public void randomEnvelopeKeys() throws GeneralSecurityException {
264249 @ Test
265250 public void testRefresh () {
266251 // This does nothing, make sure we don't throw and exception.
267- DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (
268- kms ,
269- keyId
270- );
252+ DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (kms , keyId );
271253 prov .refresh ();
272254 }
273255
@@ -558,10 +540,7 @@ public void constructorNullKmsClient() {
558540
559541 @ Test (expectedExceptions = UnsupportedOperationException .class )
560542 public void unsupportedHashKeyType () {
561- DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (
562- kms ,
563- keyId
564- );
543+ DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (kms , keyId );
565544 Map <String , AttributeValue > attrVals = new HashMap <>();
566545 attrVals .put ("hk" , AttributeValue .builder ().bool (true ).build ());
567546 EncryptionContext boolCtx = new EncryptionContext .Builder ()
@@ -573,10 +552,7 @@ public void unsupportedHashKeyType() {
573552
574553 @ Test (expectedExceptions = UnsupportedOperationException .class )
575554 public void unsupportedRangeKeyType () {
576- DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (
577- kms ,
578- keyId
579- );
555+ DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (kms , keyId );
580556 Map <String , AttributeValue > attrVals = new HashMap <>();
581557 attrVals .put ("hk" , AttributeValue .builder ().s ("HashKeyValue" ).build ());
582558 attrVals .put ("rk" , AttributeValue .builder ().bool (true ).build ());
@@ -590,10 +566,7 @@ public void unsupportedRangeKeyType() {
590566
591567 @ Test (expectedExceptions = NullPointerException .class )
592568 public void hashKeyMissingFromAttributeValues () {
593- DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (
594- kms ,
595- keyId
596- );
569+ DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (kms , keyId );
597570 EncryptionContext missingCtx = new EncryptionContext .Builder ()
598571 .hashKeyName ("hk" )
599572 .attributeValues (Collections .emptyMap ())
@@ -603,10 +576,7 @@ public void hashKeyMissingFromAttributeValues() {
603576
604577 @ Test (expectedExceptions = NullPointerException .class )
605578 public void rangeKeyMissingFromAttributeValues () {
606- DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (
607- kms ,
608- keyId
609- );
579+ DirectKmsMaterialProvider prov = new DirectKmsMaterialProvider (kms , keyId );
610580 Map <String , AttributeValue > attrVals = new HashMap <>();
611581 attrVals .put ("hk" , AttributeValue .builder ().s ("HashKeyValue" ).build ());
612582 EncryptionContext missingCtx = new EncryptionContext .Builder ()
0 commit comments