@Test
        public void traversersWithUnmergeableSacksShouldGenerateDiversifiedHashCodes() {

            final TraversalStrategies strategies = new DefaultTraversalStrategies();
            strategies.addStrategies(SackStrategy.build().initialValue(() -> 0).create());

            final Integer[] starts = IntStream.range(0, 8192).boxed().toArray(Integer[]::new);
            final GraphTraversal<Integer, Long> traversal = __.inject(starts).sack(Operator.mult).sack().
                    map(Traverser::hashCode).dedup().count();

            traversal.asAdmin().setStrategies(strategies);
            traversal.asAdmin().applyStrategies();
            assertThat(traversal.next(), is(greaterThan(8100L))); // allow a few hash collisions
        }
@author Daniel Kuppitz (http://gremlin.guru)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SackStrategyTest.java