@Test
public void testInitialize() {

  IdAndValueArrayEdges edges = getEdges();
  List<Edge<LongWritable, DoubleWritable>> initialEdges = Lists.newArrayList(
    createEdge(1), createEdge(2), createEdge(4));
  edges.initialize(initialEdges);
  assertEdges(edges, 1, 2, 4);
  edges.add(EdgeFactory.createReusable(new LongWritable(3), new DoubleWritable(3.0)));
  assertEdges(edges, 1, 2, 4, 3); // order matters, it's an array
  edges.initialize();
  assertEquals(0, edges.size());
}