@Test
public void testGetElements() {

    Configuration config = new Configuration();
    config.setTimeRepresentation(TimeRepresentation.INTERVAL);
    GraphModelImpl graphModel = new GraphModelImpl(config);
    TimeStore timeStore = graphModel.store.timeStore;
    IntervalIndexStore store = (IntervalIndexStore) timeStore.nodeIndexStore;
    Interval i1 = new Interval(1.0, 5.0);
    Interval i2 = new Interval(-1.0, 1.0);
    Interval i3 = new Interval(4.0, 8.0);
    store.add(i1);
    store.add(i2);
    store.add(i3);
    NodeImpl n0 = new NodeImpl(0);
    NodeImpl n1 = new NodeImpl(1);
    NodeImpl n2 = new NodeImpl(2);
    NodeImpl n3 = new NodeImpl(3);
    store.add(i1, n0);
    store.add(i1, n1);
    store.add(i2, n2);
    store.add(i3, n3);
    ObjectSet r1 = new ObjectOpenHashSet(getArrayFromIterable(store.mainIndex.get(new Interval(2.0, 3.0))));
    Assert.assertTrue(r1.contains(n0));
    Assert.assertTrue(r1.contains(n1));
    Assert.assertEquals(r1.size(), 2);
    ObjectSet r2 = new ObjectOpenHashSet(getArrayFromIterable(store.mainIndex.get(new Interval(-1, 3.0))));
    Assert.assertTrue(r2.contains(n0));
    Assert.assertTrue(r2.contains(n1));
    Assert.assertTrue(r2.contains(n2));
    Assert.assertEquals(r2.size(), 3);
    ObjectSet r4 = new ObjectOpenHashSet(getArrayFromIterable(store.mainIndex.get(new Interval(-1.0, -1.0))));
    Assert.assertTrue(r4.contains(n2));
    Assert.assertEquals(r4.size(), 1);
    ObjectSet r5 = new ObjectOpenHashSet(getArrayFromIterable(store.mainIndex.get(new Interval(-12.0, 10))));
    Assert.assertTrue(r5.contains(n2));
    Assert.assertTrue(r5.contains(n1));
    Assert.assertTrue(r5.contains(n0));
    Assert.assertTrue(r5.contains(n3));
    Assert.assertEquals(r5.size(), 4);
}