Merge pull request #6694 from alvasw/fix_broken_protected_storage_entry_test

Fix broken ProtectedStorageEntryTest
This commit is contained in:
Alejandro García 2023-05-13 15:35:04 +00:00 committed by GitHub
commit a3f2d6e439
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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());
assertThrows(IllegalArgumentException.class, () ->
new ProtectedStorageEntry(incompatiblePayload,ownerKeys.getPublic(), 1,
new byte[] { 0 }, Clock.systemDefaultZone());
new byte[] { 0 }, Clock.systemDefaultZone())
);
}
// TESTCASE: PSEs received with future-dated timestamps are updated to be min(currentTime, creationTimeStamp)