Fix TestKeyManager.
Change-Id: I985689f78229d7c54f74cc58284b2688f5d0b97a
This commit is contained in:
parent
d90c32005c
commit
cd0cf9262d
|
@ -31,6 +31,7 @@ import org.junit.rules.Timeout;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
|
@ -80,7 +81,7 @@ public class TestKeyManager {
|
||||||
keyManager.newDataEncryptionKey();
|
keyManager.newDataEncryptionKey();
|
||||||
assertNotEquals(
|
assertNotEquals(
|
||||||
dek, dekAfterExpiration, "KeyManager should generate a new data encryption key");
|
dek, dekAfterExpiration, "KeyManager should generate a new data encryption key");
|
||||||
assertTrue("KeyManager has an expired DataEncryptionKey!",
|
assertTrue(dekAfterExpiration.expiryDate > fakeTimer.now(),
|
||||||
dekAfterExpiration.expiryDate > fakeTimer.now());
|
"KeyManager has an expired DataEncryptionKey!");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue