### Question:
Builder { public DirectedGraph<Vertex, Edge> getGraph() { return graphSupplier.get(); } Builder(Context context);  Builder(Context context, FilterIndicator filterIndicator); DirectedGraph<Vertex, Edge> getGraph(); FilterIndicator getFilterIndicator();  }### Answer:
@Test public void getGraph() { DirectedGraph<Vertex, Edge> graph = builder.getGraph(); assertNotNull(graph); assertEquals(graph, builder.getGraph()); }
@Test public void verticesAreIncluded() { DirectedGraph<Vertex, Edge> graph = builder.getGraph(); assertEquals(7, graph.vertexSet().size()); assertTrue(graph.containsVertex(modified)); assertTrue(graph.containsVertex(modifiedUncovered)); assertTrue(graph.containsVertex(caller)); assertTrue(graph.containsVertex(callerTest)); assertTrue(graph.containsVertex(disconnectedCallerTest)); assertTrue(graph.containsVertex(START_VERTEX)); assertTrue(graph.containsVertex(END_VERTEX)); }
@Test public void edgesAreIncluded() { DirectedGraph<Vertex, Edge> graph = builder.getGraph(); Set<Edge> edges = graph.edgeSet(); assertEquals(6, edges.size()); TreeSet<Edge> sorted = new TreeSet<>(Comparator.comparing(edge -> ("" + edge.getSource() + edge.getTarget() + edge.getLinkType()))); sorted.addAll(edges); Iterator<Edge> iterator = sorted.iterator(); Edge edge1 = iterator.next(); assertEquals(METHOD_CALL, edge1.getLinkType()); assertEquals(modified, edge1.getSource()); assertEquals(caller, edge1.getTarget()); Edge edge2 = iterator.next(); assertEquals(METHOD_CALL, edge2.getLinkType()); assertEquals(caller, edge2.getSource()); assertEquals(callerTest, edge2.getTarget()); Edge edge3 = iterator.next(); assertEquals(ENTRY_POINT, edge3.getLinkType()); assertEquals(disconnectedCallerTest, edge3.getSource()); assertEquals(START_VERTEX, edge3.getTarget()); Edge edge4 = iterator.next(); assertEquals(ENTRY_POINT, edge4.getLinkType()); assertEquals(callerTest, edge4.getSource()); assertEquals(START_VERTEX, edge4.getTarget()); Edge edge5 = iterator.next(); assertEquals(EXIT_POINT, edge5.getLinkType()); assertEquals(END_VERTEX, edge5.getSource()); assertEquals(modified, edge5.getTarget()); Edge edge6 = iterator.next(); assertEquals(EXIT_POINT, edge6.getLinkType()); assertEquals(END_VERTEX, edge6.getSource()); assertEquals(modifiedUncovered, edge6.getTarget()); }