EditableText { public TextChange delete(int start, int end) { TextChange change = deletion(version, start, end); apply(change); return change; } EditableText(String s); TextChange insert(String toInsert, int position); String getText(); void apply(TextChange textChange); int getVersion(); TextChange delete(int start, int end);  }
@Test public void delete() { text.delete(0, 5); assertThat(text.getText(), is("is the baseline.")); }