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 2d901605747..267ee36bb52 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.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 protobuf.PersistableNetworkPayload toProtoMessage() { 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)