@Test
    public void shouldOfferTraverser() {
        final TraverserSet<String> ts = traverserSetMaker.get();
        assertThat(ts.offer(makeTraverser("a", 1)), is(true));
        assertThat(ts.offer(makeTraverser("a", 1)), is(false));
        assertThat(ts.offer(makeTraverser("a", 1)), is(false));
        assertThat(ts.offer(makeTraverser("a", 1)), is(false));
        assertThat(ts.offer(makeTraverser("a", 1)), is(false));
        assertThat(ts.offer(makeTraverser("a", 1)), is(false));
        assertThat(ts.offer(makeTraverser("a", 1)), is(false));
        assertThat(ts.offer(makeTraverser("b", 1)), is(true));

        final Iterator<Traverser.Admin<String>> itty = ts.iterator();
        final Traverser.Admin<String> a = itty.next();
        assertEquals(7, a.bulk());
        final Traverser.Admin<String> b = itty.next();
        assertEquals(1, b.bulk());

        assertThat(itty.hasNext(), is(false));
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/util/TraverserSetImplementationTest.java