Skip to content

Commit

Permalink
Merge pull request #6694 from alvasw/fix_broken_protected_storage_ent…
Browse files Browse the repository at this point in the history
…ry_test

Fix broken ProtectedStorageEntryTest
  • Loading branch information
alejandrogarcia83 committed May 13, 2023
2 parents 0cec85a + 787da04 commit a3f2d6e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a3f2d6e

Please sign in to comment.