@Test
    public void shouldClear() {
        final IndexedTraverserSet<String,String> ts = new IndexedTraverserSet<>(x -> x);
        ts.add(makeTraverser("test", 1));

        final List<Traverser.Admin<String>> testTraversers = new ArrayList<>(ts.get("test"));
        assertEquals(1, testTraversers.size());
        assertEquals(1, testTraversers.get(0).bulk());

        ts.clear();

        assertThat(ts.get("test"), nullValue());
        assertThat(ts.isEmpty(), is(true));
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/util/IndexedTraverserSetTest.java