@Test
public void testFill() {

    GraphStore graphStore = GraphGenerator.generateSmallMultiTypeGraphStore();
    GraphViewStore store = graphStore.viewStore;
    GraphViewImpl view = store.createView();
    DirectedSubgraph graph = store.getDirectedGraph(view);
    UndirectedSubgraph unGraph = store.getUndirectedGraph(view);
    view.fill();
    Assert.assertEquals(view.getNodeCount(), graphStore.getNodeCount());
    Assert.assertEquals(view.getEdgeCount(), graphStore.getEdgeCount());
    for (Edge e : graphStore.getEdges()) {
        Assert.assertTrue(graph.contains(e));
    }
    for (Node n : graphStore.getNodes()) {
        Assert.assertTrue(graph.contains(n));
    }
    for (int i = 0; i < graphStore.edgeTypeStore.length; i++) {
        Assert.assertEquals(graph.getEdgeCount(i), graphStore.getEdgeCount(i));
    }
    for (Edge e : graphStore.undirectedDecorator.getEdges()) {
        Assert.assertTrue(unGraph.contains(e));
    }
    for (Node n : graphStore.undirectedDecorator.getNodes()) {
        Assert.assertTrue(unGraph.contains(n));
    }
    for (int i = 0; i < graphStore.edgeTypeStore.length; i++) {
        Assert.assertEquals(unGraph.getEdgeCount(i), graphStore.undirectedDecorator.getEdgeCount(i));
    }
}