### Question:
EagerPrim implements MST { @Override public double weight() { return 0; } EagerPrim(EdgeWeightedGraph G); @Override Iterable<Edge> edges(); @Override double weight();  }### Answer:
@Test public void randomTest() { for (int i = 1; i < 100; i++) { EdgeWeightedGraph graph = buildRandomConnectedGraph(i); EagerPrim test = new EagerPrim(graph); PrimMST expect = new PrimMST(graph); assertTrue(info(test, expect), Math.abs(test.weight() - expect.weight()) < FLOATING_POINT_EPSILON); System.out.println("pass " + i); } }