Instruction { public static Instruction end() { return END; }  static void addAll(List<Instruction> list, Instruction[] array); static Instruction jump(int offset); static Instruction call(int offset, Matcher matcher); static Instruction ret(); static Instruction backtrack(); static Instruction end(); static Instruction choice(int offset); static Instruction predicateChoice(int offset); static Instruction commit(int offset); static Instruction commitVerify(int offset); static Instruction failTwice(); static Instruction backCommit(int offset); static Instruction ignoreErrors(); abstract void execute(Machine machine);  }
@Test public void end() { Instruction instruction = Instruction.end(); assertThat(instruction).isInstanceOf(EndInstruction.class); assertThat(instruction.toString()).isEqualTo("End"); assertThat(instruction).as("singleton").isSameAs(Instruction.end()); instruction.execute(machine); InOrder inOrder = Mockito.inOrder(machine); inOrder.verify(machine).setAddress(-1); verifyNoMoreInteractions(machine); }