@Test
public void testToArray() {

    EdgeImpl[] edges = GraphGenerator.generateEdgeList(3);
    EdgeStore edgeStore = new EdgeStore();
    Assert.assertEquals(new EdgeImpl[0], edgeStore.toArray());
    edgeStore.addAll(Arrays.asList(edges));
    Assert.assertEquals(edges, edgeStore.toArray());
    Assert.assertEquals(edges, edgeStore.toArray(new Edge[0]));
    edgeStore.clear();
    Assert.assertEquals(new EdgeImpl[0], edgeStore.toArray());
}