diff options
Diffstat (limited to 'dcae-analytics-common/src/test/java')
-rw-r--r-- | dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/BaseAnalyticsCommonUnitTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/BaseAnalyticsCommonUnitTest.java b/dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/BaseAnalyticsCommonUnitTest.java index 1cd59e8..fd28624 100644 --- a/dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/BaseAnalyticsCommonUnitTest.java +++ b/dcae-analytics-common/src/test/java/org/openecomp/dcae/apod/analytics/common/BaseAnalyticsCommonUnitTest.java @@ -20,9 +20,13 @@ package org.openecomp.dcae.apod.analytics.common;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Suppliers;
+import org.junit.BeforeClass;
import org.openecomp.dcae.apod.analytics.common.service.processor.TestEarlyTerminatingProcessor;
import org.openecomp.dcae.apod.analytics.common.service.processor.TestMessageProcessor1;
import org.openecomp.dcae.apod.analytics.common.service.processor.TestMessageProcessor2;
+import org.openecomp.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;
import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
/**
@@ -37,6 +41,18 @@ public abstract class BaseAnalyticsCommonUnitTest extends BaseDCAEAnalyticsUnitT protected static final String CEF_MESSAGE_FILE_PATH = "data/json/cef/cef_message.json";
+ protected static ObjectMapper objectMapper;
+
+ /**
+ * Before running test cases need to assign object mapper.
+ */
+ @BeforeClass
+ public static void beforeClass() {
+ final AnalyticsModelObjectMapperSupplier analyticsModelObjectMapperSupplier =
+ new AnalyticsModelObjectMapperSupplier();
+ objectMapper = Suppliers.memoize(analyticsModelObjectMapperSupplier).get();
+ }
+
/*
* Test implementation for {@link CDAPAppSettings}
*/
|