@Test
public void testIterator() {

    NodeStore nodeStore = new NodeStore();
    NodeImpl[] nodes = new NodeImpl[] { new NodeImpl("0"), new NodeImpl("1"), new NodeImpl("2") };
    nodeStore.addAll(Arrays.asList(nodes));
    NodeStore.NodeStoreIterator itr = nodeStore.iterator();
    int index = 0;
    while (itr.hasNext()) {
        NodeImpl n = itr.next();
        Assert.assertSame(n, nodes[index++]);
    }
    Assert.assertEquals(index, nodes.length);
}