Fix broken ProtectedStorageEntryTest

Relates to #6619
This commit is contained in:
Alva Swanson 2023-05-10 09:34:22 +02:00
parent 2e892bf90a
commit 787da04539
No known key found for this signature in database
GPG Key ID: 004760E77F753090

View File

@ -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)