aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/aai/datarouter/policy/SpikeAutosuggestProcessorTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/onap/aai/datarouter/policy/SpikeAutosuggestProcessorTest.java')
-rw-r--r--src/test/java/org/onap/aai/datarouter/policy/SpikeAutosuggestProcessorTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/java/org/onap/aai/datarouter/policy/SpikeAutosuggestProcessorTest.java b/src/test/java/org/onap/aai/datarouter/policy/SpikeAutosuggestProcessorTest.java
index c49f17b..6791ac3 100644
--- a/src/test/java/org/onap/aai/datarouter/policy/SpikeAutosuggestProcessorTest.java
+++ b/src/test/java/org/onap/aai/datarouter/policy/SpikeAutosuggestProcessorTest.java
@@ -33,14 +33,27 @@ import org.apache.camel.Message;
import org.apache.commons.io.IOUtils;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.onap.aai.datarouter.util.NodeUtils;
+import org.onap.aai.setup.SchemaLocationsBean;
+import org.onap.aai.setup.SchemaVersions;
import org.powermock.api.mockito.PowerMockito;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration("file:src/test/resources/spring-beans/data-router-oxm.xml")
public class SpikeAutosuggestProcessorTest {
private SpikeEventPolicyConfig eventPolicyConfig;
private SpikeAutosuggestIndexProcessor policy;
private InMemorySearchDatastore searchDb;
+ @Autowired
+ private SchemaVersions schemaVersions;
+ @Autowired
+ private SchemaLocationsBean schemaLocationsBean;
+
@Before
public void init() throws Exception {
@@ -48,6 +61,9 @@ public class SpikeAutosuggestProcessorTest {
eventPolicyConfig.setSearchKeystorePwd("password");
eventPolicyConfig.setSourceDomain("JUNIT");
+ eventPolicyConfig.setSchemaVersions(schemaVersions);
+ eventPolicyConfig.setSchemaLocationsBean(schemaLocationsBean);
+
searchDb = new InMemorySearchDatastore();
policy = new SpikeAutosuggestProcessorStubbed(eventPolicyConfig).withSearchDb(searchDb);