Skip to content

Commit f725668

Browse files
authored
Unit test
1 parent 9db1e45 commit f725668

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,14 @@ public void testBuild_ShouldThrowIllegalArgumentException_WhenNotDefiniteEncrypt
9696
.withEncryptionCertificate(TestUtils.getTestEncryptionCertificate())
9797
.build();
9898
}
99+
100+
@Test
101+
public void testBuild_ShouldNotComputeCertificateKeyFingerprint_WhenFingerprintSet() throws Exception {
102+
EncryptionConfig config = JweConfigBuilder.aJweEncryptionConfig()
103+
.withEncryptionCertificate(TestUtils.getTestEncryptionCertificate())
104+
.withDecryptionKey(TestUtils.getTestDecryptionKey())
105+
.withEncryptionKeyFingerprint("2f4lvi26vJWzkzAIaiR2G0YsJAQ=")
106+
.build();
107+
Assert.assertEquals("2f4lvi26vJWzkzAIaiR2G0YsJAQ=", config.getEncryptionKeyFingerprint());
108+
}
99109
}

0 commit comments

Comments
 (0)