Skip to content

Commit 2c45d1f

Browse files
committed
Refactored Changes after Peer Review
1 parent 072c95e commit 2c45d1f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sdk1/src/test/java/com/amazonaws/services/dynamodbv2/datamodeling/encryption/DynamoDBEncryptorTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,15 @@ public void ensureEncryptedAttributesUnmodified() throws GeneralSecurityExceptio
199199
Map<String, AttributeValue> encryptedAttributes =
200200
encryptor.encryptAllFieldsExcept(
201201
Collections.unmodifiableMap(attribs), context, "hashKey", "rangeKey", "version");
202-
String beforeDecryption = (new TreeMap<>(encryptedAttributes)).toString();
202+
String encryptedString = new TreeMap<>(encryptedAttributes).toString();
203203
encryptor.decryptAllFieldsExcept(
204204
Collections.unmodifiableMap(encryptedAttributes),
205205
context,
206206
"hashKey",
207207
"rangeKey",
208208
"version");
209-
String afterDecryption = (new TreeMap<>(encryptedAttributes)).toString();
210209

211-
assertEquals(beforeDecryption, afterDecryption);
210+
assertEquals(encryptedString, new TreeMap<>(encryptedAttributes).toString());
212211
}
213212

214213
@Test(expectedExceptions = SignatureException.class)

0 commit comments

Comments
 (0)