Neo4JDbFeatureExecutor extends AbstractDbFeatureExecutor<Graph<Node, Edge>, Connection> { @Override protected DbFeature<Connection> createVerifyDataAfterFeature(final ExpectedDataSets expectedDataSets) { return (final Connection connection) -> { final Graph<Node, Edge> mergedGraph = mergeGraphs(loadDataSets(Arrays.asList(expectedDataSets.value()))); final GraphComparator graphComparator = new GraphComparator(graphElementFactory, expectedDataSets.excludeColumns(), expectedDataSets.strict()); final AssertionErrorCollector errorCollector = new AssertionErrorCollector(); graphComparator.compare(connection, mergedGraph, errorCollector); errorCollector.report(); }; } protected  Neo4JDbFeatureExecutor(final FeatureResolver featureResolver, final List<Class<?>> entityClasses);   }
@Test public void testVerifyDataAfterFeatureExecution() throws DbFeatureException, SQLException { when(expectedDataSets.strict()).thenReturn(Boolean.FALSE); when(expectedDataSets.value()).thenReturn(new String[] {}); when(expectedDataSets.orderBy()).thenReturn(new String[] {}); when(expectedDataSets.excludeColumns()).thenReturn(new String[] {}); final DbFeature<Connection> feature = featureExecutor.createVerifyDataAfterFeature(expectedDataSets); assertThat(feature, notNullValue()); feature.execute(connection); verify(connection, times(2)).prepareStatement(anyString()); verify(ps, times(2)).executeQuery(); verify(rs, times(2)).next(); verify(rs, times(2)).close(); verify(ps, times(2)).close(); verifyNoMoreInteractions(connection); }