TimestampIndexStore extends TimeIndexStore<T, Double, TimestampSet, TimestampMap<?>> { protected Double2IntRBTreeMap getMap() { return (Double2IntRBTreeMap) timeSortedMap; } TimestampIndexStore(Class<T> type, GraphLock lock, boolean indexed);   }
@Test public void testAddOne() { TimestampIndexStore<Node> store = new TimestampIndexStore<Node>(Node.class, null, false); int a = store.add(1.0); Assert.assertEquals(a, 0); Assert.assertTrue(store.contains(1.0)); Assert.assertEquals(store.size(), 1); Assert.assertEquals(store.getMap().get(1.0), 0); }
@Test public void testAddTwiceSame() { TimestampIndexStore<Node> store = new TimestampIndexStore<Node>(Node.class, null, false); int a = store.add(1.0); int b = store.add(1.0); Assert.assertEquals(a, b); Assert.assertTrue(store.contains(1.0)); Assert.assertEquals(store.size(), 1); Assert.assertEquals(store.getMap().get(1.0), 0); }