@Test
    public void shouldMaintainIndexOfTraversersAfterShuffle() {
        final IndexedTraverserSet<String, String> ts = makeOtherTraverserSet();

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

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

        ts.shuffle(new Random());

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

        final List<Traverser.Admin<String>> nopeTraversersAfterShuffle = new ArrayList<>(ts.get("nope"));
        assertEquals(1, nopeTraversersAfterShuffle.size());
        assertEquals(1, nopeTraversersAfterShuffle.get(0).bulk());
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/util/IndexedTraverserSetTest.java