@baldur we should create a subclass of RouteFragment for testing purposes that contains these variables to keep them out of the real code. For example:

    class TestRouteFragment extends RouteFragment {
        private int itemIndex = 0;
        private Set<Instruction> flippedInstructions = new HashSet<Instruction>();

        @Override
        protected void flipInstructionToAfter(Instruction instruction) {
            if (flippedInstructions.contains(instruction)) {
                return;
            }

            itemIndex = pager.getAdapter().getItemPosition(instruction);
            flippedInstructions.add(instruction);
            super.flipInstructionToAfter(instruction);
        }

        public int getItemIndex() {
            return itemIndex;
        }

        public Set<Instruction> getFlippedInstructions() {
            return flippedInstructions;
        }
    }