WordPos implements Comparable<WordPos>, Serializable { public WordPos forward() { return new WordPos(word.substring(1), tag); } WordPos();  WordPos(String word, PartOfSpeech tag); WordPos forward(); String getWord(); void setWord(String word); PartOfSpeech getTag(); void setTag(PartOfSpeech tag); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override int compareTo(WordPos o); @Override String toString();  }
@Test public void testForward() { WordPos wordPos = new WordPos("aWord", PartOfSpeech.NN).forward(); assertEquals(wordPos.getWord(), "Word"); }