History { public abstract void clear();  boolean isEnabled(); void enable(); void disable(); abstract void push(int[] entry); abstract int[] find(int[] search); abstract int[] get(int index); abstract int size(); abstract void setSearchDirection(SearchDirection direction); abstract SearchDirection getSearchDirection(); abstract int[] getNextFetch(); abstract int[] getPreviousFetch(); abstract int[] search(int[] search); abstract void setCurrent(int[] line); abstract int[] getCurrent(); abstract List<int[]> getAll(); abstract void clear(); abstract void stop();  }
@Test public void testClear() { History history = new InMemoryHistory(10); history.push(Parser.toCodePoints("1")); history.push(Parser.toCodePoints("2")); assertArrayEquals(Parser.toCodePoints("2"), history.getPreviousFetch()); history.clear(); assertArrayEquals(new int[]{}, history.getPreviousFetch()); }