// Path: neo4j/src/test/java/eu/drus/jpa/unit/neo4j/test/entities/B.java
// @Entity
// public class B {
// 
//     @Id
//     private Long id;
// }


import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.hasItems;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import static org.powermock.api.mockito.PowerMockito.whenNew;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.jgrapht.Graph;
import org.jgrapht.graph.ClassBasedEdgeFactory;
import org.jgrapht.graph.DefaultDirectedGraph;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import com.google.common.collect.ImmutableMap;
import eu.drus.jpa.unit.neo4j.test.entities.A;
import eu.drus.jpa.unit.neo4j.test.entities.B;
import eu.drus.jpa.unit.spi.AssertionErrorCollector;
package eu.drus.jpa.unit.neo4j.dataset;






@RunWith(PowerMockRunner.class)
@PrepareForTest(GraphComparator.class)
public class GraphComparatorTest {

    private GraphElementFactory graphElementFactory;

    @Mock
    private DatabaseReader dbReader;

    @Mock
    private Connection connection;

    @Mock
    private AssertionErrorCollector errorCollector;

    private Graph<Node, Edge> createGraph(final List<Node> nodes, final List<Edge> edges) {
        final Graph<Node, Edge> graph = new DefaultDirectedGraph<>(new ClassBasedEdgeFactory<>(Edge.class));
        nodes.forEach(graph::addVertex);
        edges.forEach(e -> graph.addEdge(e.getSourceNode(), e.getTargetNode(), e));
        return graph;
    }

    @Before
    public void prepareTest() throws Exception {
        whenNew(DatabaseReader.class).withAnyArguments().thenReturn(dbReader);

// Path: neo4j/src/test/java/eu/drus/jpa/unit/neo4j/test/entities/B.java
// @Entity
// public class B {
// 
//     @Id
//     private Long id;
// }


// Path: neo4j/src/test/java/eu/drus/jpa/unit/neo4j/dataset/GraphComparatorTest.java
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.hasItems;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import static org.powermock.api.mockito.PowerMockito.whenNew;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.jgrapht.Graph;
import org.jgrapht.graph.ClassBasedEdgeFactory;
import org.jgrapht.graph.DefaultDirectedGraph;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import com.google.common.collect.ImmutableMap;
import eu.drus.jpa.unit.neo4j.test.entities.A;
import eu.drus.jpa.unit.neo4j.test.entities.B;
import eu.drus.jpa.unit.spi.AssertionErrorCollector;

package eu.drus.jpa.unit.neo4j.dataset;






@RunWith(PowerMockRunner.class)
@PrepareForTest(GraphComparator.class)
public class GraphComparatorTest {

    private GraphElementFactory graphElementFactory;

    @Mock
    private DatabaseReader dbReader;

    @Mock
    private Connection connection;

    @Mock
    private AssertionErrorCollector errorCollector;

    private Graph<Node, Edge> createGraph(final List<Node> nodes, final List<Edge> edges) {
        final Graph<Node, Edge> graph = new DefaultDirectedGraph<>(new ClassBasedEdgeFactory<>(Edge.class));
        nodes.forEach(graph::addVertex);
        edges.forEach(e -> graph.addEdge(e.getSourceNode(), e.getTargetNode(), e));
        return graph;
    }

    @Before
    public void prepareTest() throws Exception {
        whenNew(DatabaseReader.class).withAnyArguments().thenReturn(dbReader);

        graphElementFactory = new GraphElementFactory(Arrays.asList(A.class, B.class));