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 515cf71d..22af5b70 100644 --- a/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java +++ b/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java @@ -512,7 +512,7 @@ public class EncryptDecryptRoundTripTest { "-----END PGP MESSAGE-----").getBytes(StandardCharsets.UTF_8); SessionKey wrongSessionKey = SessionKey.fromString("9:63F741E7FB60247BE59C64158573308F727236482DB7653908C95839E4166AAE"); - assertThrows(SOPGPException.BadData.class, () -> + assertThrows(SOPGPException.CannotDecrypt.class, () -> sop.decrypt().withSessionKey(wrongSessionKey).ciphertext(ciphertext)); }