diff options
author | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2021-02-16 16:25:18 +0000 |
---|---|---|
committer | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2021-02-19 15:26:11 +0000 |
commit | 5a94ebda407e82a8df4abea1b8a916ea4f88d9cd (patch) | |
tree | 9372cfd5e716196ddd1bf908d4da5db7e64f93c0 /models-dao/src/test | |
parent | 7e4f9950ed004042e36e7e1f6f78224d62888e74 (diff) |
Refactor timestamp property in policy models to use Instant
Updated JPA classes to use java.sql.TImestamp rather than Instant.
Issue-ID: POLICY-3069
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: If5b874ec96931d4b8dd142d46a9980e83a4708fc
Diffstat (limited to 'models-dao/src/test')
-rw-r--r-- | models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java index 040b76b9b..1ba2e4139 100644 --- a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java +++ b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019-2020 Nordix Foundation. + * Copyright (C) 2019-2021 Nordix Foundation. * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,8 +27,8 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import java.time.Instant; import java.util.ArrayList; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -58,9 +58,9 @@ public class EntityTest { private static final String VERSION003 = "0.0.3"; private static final String VERSION002 = "0.0.2"; private static final String VERSION001 = "0.0.1"; - private static final Date TIMESTAMP0 = new Date(); - private static final Date TIMESTAMP1 = new Date(); - private static final Date TIMESTAMP2 = new Date(); + private static final Instant TIMESTAMP0 = Instant.ofEpochSecond(1613494293); + private static final Instant TIMESTAMP1 = Instant.ofEpochSecond(1613494293).plusSeconds(55); + private static final Instant TIMESTAMP2 = Instant.ofEpochSecond(1613494293).plusSeconds(90); private PfDao pfDao; @Test |