From 787da0453902487984baaa86c7a347e1ee277b17 Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Wed, 10 May 2023 09:34:22 +0200 Subject: [PATCH] Fix broken ProtectedStorageEntryTest Relates to #6619 --- .../p2p/storage/payload/ProtectedStorageEntryTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/p2p/src/test/java/bisq/network/p2p/storage/payload/ProtectedStorageEntryTest.java b/p2p/src/test/java/bisq/network/p2p/storage/payload/ProtectedStorageEntryTest.java index 2d90160574..267ee36bb5 100644 --- a/p2p/src/test/java/bisq/network/p2p/storage/payload/ProtectedStorageEntryTest.java +++ b/p2p/src/test/java/bisq/network/p2p/storage/payload/ProtectedStorageEntryTest.java @@ -37,6 +37,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -255,8 +256,10 @@ public class ProtectedStorageEntryTest { KeyPair ownerKeys = TestUtils.generateKeyPair(); IncompatiblePayload incompatiblePayload = new IncompatiblePayload(ownerKeys.getPublic()); - new ProtectedStorageEntry(incompatiblePayload,ownerKeys.getPublic(), 1, - new byte[] { 0 }, Clock.systemDefaultZone()); + assertThrows(IllegalArgumentException.class, () -> + new ProtectedStorageEntry(incompatiblePayload,ownerKeys.getPublic(), 1, + new byte[] { 0 }, Clock.systemDefaultZone()) + ); } // TESTCASE: PSEs received with future-dated timestamps are updated to be min(currentTime, creationTimeStamp)