@Override
        public void setup(final Memory memory) {
            MemoryTraversalSideEffects.setMemorySideEffects(this.traversal.get(), memory, ProgramPhase.SETUP);
            final Map<Vertex, Long> map = (Map<Vertex, Long>) this.haltedTraversers.iterator().next().get();
            assertEquals(2, map.size());
            assertTrue(map.values().contains(3l));
            assertTrue(map.values().contains(1l));
            final IndexedTraverserSet<Object,Vertex> activeTraversers = new IndexedTraverserSet.VertexIndexedTraverserSet();
            map.keySet().forEach(vertex -> activeTraversers.add(this.haltedTraversers.peek().split(vertex, EmptyStep.instance())));
            this.haltedTraversers.clear();
            this.checkSideEffects();
            memory.set(TraversalVertexProgram.ACTIVE_TRAVERSERS, activeTraversers);
        }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ProgramTest.java