Machine implements CharSequence { @Override public CharSequence subSequence(int start, int end) { throw new UnsupportedOperationException(); } Machine(String input, Instruction[] instructions, MachineHandler handler); private  Machine(char[] input, Token[] tokens, Instruction[] instructions, MachineHandler handler);  Machine(String input, Instruction[] instructions); static ParseNode parse(List<Token> tokens, CompiledGrammar grammar); static ParsingResult parse(char[] input, CompiledGrammar grammar); static boolean execute(String input, Instruction[] instructions); static boolean execute(Instruction[] instructions, Token... input); int getAddress(); void setAddress(int address); void jump(int offset); void popReturn(); void pushReturn(int returnOffset, Matcher matcher, int callOffset); void pushBacktrack(int offset); void pop(); MachineStack peek(); void setIgnoreErrors(boolean ignoreErrors); void backtrack(); void createNode(); void createLeafNode(Matcher matcher, int offset); int getIndex(); void setIndex(int index); void advanceIndex(int offset); @Override int length(); @Override char charAt(int offset); @Override CharSequence subSequence(int start, int end); Token tokenAt(int offset);  }
@Test public void subSequence_not_supported() { Machine machine = new Machine("", new Instruction[0]); thrown.expect(UnsupportedOperationException.class); machine.subSequence(0, 0); }