### Question:
GraphMetrics { public static <V, E> double getDiameter(Graph<V, E> graph) { return new GraphMeasurer<>(graph).getDiameter(); }  static double getDiameter(Graph<V, E> graph); static double getRadius(Graph<V, E> graph); static int getGirth(Graph<V, E> graph);  }### Answer:
@Test public void testGraphDiameter() { Graph<Integer, DefaultWeightedEdge> g = new SimpleDirectedWeightedGraph<>(DefaultWeightedEdge.class); Graphs.addEdgeWithVertices(g, 0, 1, 10); Graphs.addEdgeWithVertices(g, 1, 0, 12); double diameter = GraphMetrics.getDiameter(g); assertEquals(12.0, diameter, EPSILON); }