GraphViewStore { public UndirectedSubgraph getUndirectedGraph(GraphView view) { checkNonNullViewObject(view); if (view.isMainView()) { return graphStore.undirectedDecorator; } return ((GraphViewImpl) view).getUndirectedGraph(); } GraphViewStore(GraphStore graphStore); GraphViewImpl createView(); GraphViewImpl createView(boolean nodes, boolean edges); GraphViewImpl createView(GraphView view); GraphViewImpl createView(GraphView view, boolean nodes, boolean edges); void destroyView(GraphView view); void setTimeInterval(GraphView view, Interval interval); boolean contains(GraphView view); int size(); Subgraph getGraph(GraphView view); DirectedSubgraph getDirectedGraph(GraphView view); UndirectedSubgraph getUndirectedGraph(GraphView view); GraphView getVisibleView(); void setVisibleView(GraphView view); GraphObserverImpl createGraphObserver(Graph graph, boolean withDiff); void destroyGraphObserver(GraphObserverImpl graphObserver); int deepHashCode(); boolean deepEquals(GraphViewStore obj);  }
@Test public void testGetUnDirectedGraph() { GraphStore graphStore = GraphGenerator.generateSmallGraphStore(); GraphViewStore store = graphStore.viewStore; GraphViewImpl view = store.createView(); UndirectedSubgraph undirectedSubgraph = store.getUndirectedGraph(view); Assert.assertNotNull(undirectedSubgraph); Assert.assertSame(view, undirectedSubgraph.getView()); }
@Test(expectedExceptions = NullPointerException.class) public void testGetUndirectedGraphNull() { GraphStore graphStore = GraphGenerator.generateSmallGraphStore(); GraphViewStore store = graphStore.viewStore; store.getUndirectedGraph(null); }