From 814421fe79a35dcbc033f39fff3e9d8bc446d88a Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Mon, 12 Jun 2023 14:48:58 +0200 Subject: [PATCH] Test constructor of RevocationState.softRevoked() requires non-null date --- .../java/org/pgpainless/algorithm/RevocationStateTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pgpainless-core/src/test/java/org/pgpainless/algorithm/RevocationStateTest.java b/pgpainless-core/src/test/java/org/pgpainless/algorithm/RevocationStateTest.java index c24084b4..f5189eb9 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/algorithm/RevocationStateTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/algorithm/RevocationStateTest.java @@ -22,6 +22,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue; public class RevocationStateTest { + @Test + public void softRevokedRequiresDate() { + // noinspection DataFlowIssue, ResultOfMethodCallIgnored + assertThrows(NullPointerException.class, () -> + RevocationState.softRevoked(null)); + } + @Test public void testNotRevoked() { RevocationState state = RevocationState.notRevoked();