Skip to content

Commit b0b6792

Browse files
committed
Fixing broken test
1 parent 5dbb9b4 commit b0b6792

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/test/java/com/mastercard/developer/encryption/FieldLevelEncryptionWithDefaultJsonEngineTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ public void testEncryptPayload_ShouldEncryptWithWildcard() throws Exception {
134134
// GIVEN
135135
String payload = "{ \"fields\": [" +
136136
" {" +
137-
" \"field1\": \"1234\"," +
137+
" \"field1\": \"AAAA\"," +
138138
" \"field2\": \"asdf\"" +
139139
" }," +
140140
" {" +
141-
" \"field1\": \"5678\"," +
141+
" \"field1\": \"BBBB\"," +
142142
" \"field2\": \"zxcv\"" +
143143
" }" +
144144
"]}";
@@ -152,7 +152,7 @@ public void testEncryptPayload_ShouldEncryptWithWildcard() throws Exception {
152152
String encryptedPayload = FieldLevelEncryption.encryptPayload(payload, config);
153153

154154
// THEN
155-
assertDecryptedPayloadEquals("{\"fields\":[{\"field2\":\"asdf\",\"field1\":1234},{\"field2\":\"zxcv\",\"field1\":5678}]}", encryptedPayload, config);
155+
assertDecryptedPayloadEquals("{\"fields\":[{\"field2\":\"asdf\",\"field1\":\"AAAA\"},{\"field2\":\"zxcv\",\"field1\":\"BBBB\"}]}", encryptedPayload, config);
156156
}
157157

158158

src/test/java/com/mastercard/developer/encryption/JweEncryptionWithDefaultJsonEngineTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public void testEncryptPayload_ShouldEncryptWithWildcard() throws Exception {
3939
// GIVEN
4040
String payload = "{ \"fields\": [" +
4141
" {" +
42-
" \"field1\": \"1234\"," +
42+
" \"field1\": \"AAAA\"," +
4343
" \"field2\": \"asdf\"" +
4444
" }," +
4545
" {" +
46-
" \"field1\": \"5678\"," +
46+
" \"field1\": \"BBBB\"," +
4747
" \"field2\": \"zxcv\"" +
4848
" }" +
4949
"]}";
@@ -56,8 +56,7 @@ public void testEncryptPayload_ShouldEncryptWithWildcard() throws Exception {
5656
String encryptedPayload = JweEncryption.encryptPayload(payload, config);
5757

5858
// THEN
59-
JsonObject encryptedPayloadObject = new Gson().fromJson(encryptedPayload, JsonObject.class);
60-
assertDecryptedJweEquals("{\"fields\":[{\"field2\":\"asdf\",\"field1\":1234},{\"field2\":\"zxcv\",\"field1\":5678}]}", encryptedPayload, config);
59+
assertDecryptedJweEquals("{\"fields\":[{\"field2\":\"asdf\",\"field1\":\"AAAA\"},{\"field2\":\"zxcv\",\"field1\":\"BBBB\"}]}", encryptedPayload, config);
6160
}
6261

6362
@Test

0 commit comments

Comments
 (0)