Neo4JDbFeatureExecutor extends AbstractDbFeatureExecutor<Graph<Node, Edge>, Connection> { @Override protected List<Graph<Node, Edge>> loadDataSets(final List<String> paths) { final List<Graph<Node, Edge>> dataSets = new ArrayList<>(); try { for (final String path : paths) { final File file = new File(toUri(path)); final DataSetLoader<Graph<Node, Edge>> loader = DataSetFormat.inferFromFile(file) .select(new DataSetLoaderProvider(graphElementFactory)); dataSets.add(loader.load(file)); } } catch (final IOException | URISyntaxException e) { throw new JpaUnitException("Could not load initial data sets", e); } return dataSets; } protected  Neo4JDbFeatureExecutor(final FeatureResolver featureResolver, final List<Class<?>> entityClasses);   }
@Test public void testLoadDataSetsUsingAvailableFilePaths() { final List<Graph<Node, Edge>> dataSetList = featureExecutor.loadDataSets(Arrays.asList("test-data.xml", "test-data.xml")); assertNotNull(dataSetList); assertThat(dataSetList.size(), equalTo(2)); final Graph<Node, Edge> graph1 = dataSetList.get(0); assertNotNull(graph1); assertThat(graph1.vertexSet().size(), equalTo(6)); assertThat(graph1.edgeSet().size(), equalTo(4)); final Graph<Node, Edge> graph2 = dataSetList.get(1); assertNotNull(graph2); assertThat(graph2.vertexSet().size(), equalTo(6)); assertThat(graph2.edgeSet().size(), equalTo(4)); assertThat(graph1, equalTo(graph1)); }
@Test(expected = JpaUnitException.class) public void testLoadDataSetsUsingNotAvailableFilePaths() { featureExecutor.loadDataSets(Arrays.asList("test-data1.xml")); }