GenerateKeyTest: Provoke exception for CertCannotEncrypt test case

This commit is contained in:
Paul Schaub 2025-06-02 12:54:41 +02:00
parent 589884672a
commit 61206dde53
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -119,7 +119,9 @@ public class GenerateKeyTest extends AbstractSOPTest {
assertThrows(SOPGPException.CertCannotEncrypt.class, () ->
sop.encrypt().withCert(signingOnlyCert)
.plaintext(TestData.PLAINTEXT.getBytes(StandardCharsets.UTF_8)));
.plaintext(TestData.PLAINTEXT.getBytes(StandardCharsets.UTF_8))
.toByteArrayAndResult()
.getBytes());
}
@ParameterizedTest