Integrate aai-schema-ingest library into aai-core
[aai/aai-common.git] / aai-core / src / test / java / org / onap / aai / parsers / query / RelationshipQueryTest.java
index c92cab2..2846e7f 100644 (file)
@@ -22,11 +22,13 @@ package org.onap.aai.parsers.query;
 import org.eclipse.persistence.dynamic.DynamicEntity;
 import org.eclipse.persistence.jaxb.UnmarshallerProperties;
 import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
+import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.onap.aai.AAISetup;
 import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.introspection.*;
+import org.onap.aai.setup.SchemaVersion;
 import org.onap.aai.serialization.engines.QueryStyle;
 import org.onap.aai.serialization.engines.JanusGraphDBEngine;
 import org.onap.aai.serialization.engines.TransactionalGraphEngine;
@@ -42,15 +44,19 @@ import static org.junit.Assert.assertEquals;
 @Ignore
 public class RelationshipQueryTest extends AAISetup {
 
-       private ModelInjestor injestor = ModelInjestor.getInstance();
 
-       private TransactionalGraphEngine dbEngine = 
-                       new JanusGraphDBEngine(QueryStyle.GREMLIN_TRAVERSAL, 
-                               LoaderFactory.createLoaderForVersion(ModelType.MOXY, Version.v8),
-                               false);
-       private final Version version = Version.v8;
-       private DynamicJAXBContext context = injestor.getContextForVersion(version);
+       private TransactionalGraphEngine dbEngine;
+       private SchemaVersion version;
+       private DynamicJAXBContext context = nodeIngestor.getContextForVersion(version);
 
+       @Before
+       public void setup(){
+           version = new SchemaVersion("v8");
+               dbEngine =
+                       new JanusGraphDBEngine(QueryStyle.GREMLIN_TRAVERSAL,
+                               loaderFactory.createLoaderForVersion(ModelType.MOXY, version),
+                               false);
+       }
        /**
         * Parent query.
         *