summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/events
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/model-impl/events')
-rw-r--r--controlloop/common/model-impl/events/pom.xml6
-rw-r--r--controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java7
2 files changed, 13 insertions, 0 deletions
diff --git a/controlloop/common/model-impl/events/pom.xml b/controlloop/common/model-impl/events/pom.xml
index a07bb4786..390d082c5 100644
--- a/controlloop/common/model-impl/events/pom.xml
+++ b/controlloop/common/model-impl/events/pom.xml
@@ -33,5 +33,11 @@
<version>2.5</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java b/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java
index 37b148beb..858dc82b9 100644
--- a/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java
+++ b/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java
@@ -127,5 +127,12 @@ public final class Serialization {
.registerTypeAdapter(ControlLoopNotificationType.class, new notificationTypeAdapter())
.registerTypeAdapter(ControlLoopTargetType.class, new targetTypeAdapter())
.create();
+
+ final static public Gson gsonJunit = new GsonBuilder().disableHtmlEscaping()
+ .setPrettyPrinting()
+ .registerTypeAdapter(ZonedDateTime.class, new gsonUTCAdapter())
+ .registerTypeAdapter(Instant.class, new gsonInstantAdapter())
+ .registerTypeAdapter(ControlLoopTargetType.class, new targetTypeAdapter())
+ .create();
}