Updated champ-lib to use the correct logger
[aai/champ.git] / champ-lib / champ-core / src / test / java / org / onap / aai / champcore / ie / ImportTest.java
index 858c377..756d4ca 100644 (file)
@@ -90,4 +90,22 @@ public class ImportTest {
 
                api.shutdown();
        }
+       
+        @Test
+         public void testUndefinedEdgeSourceAndTarget() throws ChampTransactionException, AssertionError {
+
+           final GraphMLImporterExporter importer = new GraphMLImporterExporter();
+           final ChampAPI api = ChampAPI.Factory.newInstance("IN_MEMORY");
+
+           importer.importData(api, getClass().getClassLoader().getResourceAsStream("import-test2.graphml"));
+
+           final ChampGraph graph = api.getGraph(GRAPH_NAME);
+
+           graph.queryObjects(Collections.emptyMap(), Optional.empty()).forEach(object -> {
+             final Optional<String> nameOpt = object.getProperty("name");
+             assertTrue(!nameOpt.isPresent());
+           });
+
+           api.shutdown();
+         }
 }