diff --git a/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java b/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java index 7bc5bfdb..52db6a62 100644 --- a/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java +++ b/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java @@ -166,18 +166,20 @@ public class EncryptDecryptRoundTripTest { } @Test - public void encrypt_decryptAndVerifyYieldsNoSignatureException() throws IOException { + public void encrypt_decryptAndVerifyYieldsNoVerifications() throws IOException { byte[] encrypted = sop.encrypt() .withCert(bobCert) .plaintext(message) .getBytes(); - assertThrows(SOPGPException.NoSignature.class, () -> sop - .decrypt() + DecryptionResult result = sop.decrypt() .withKey(bobKey) .verifyWithCert(aliceCert) .ciphertext(encrypted) - .toByteArrayAndResult()); + .toByteArrayAndResult() + .getResult(); + + assertTrue(result.getVerifications().isEmpty()); } @Test