PatternExtract { public void setWordTokens(final List<WordToken> words) { this.words = words; } PatternExtract(final Entity from, final Entity to, final int start, final int end); Entity getFrom(); Entity getTo(); int getStart(); int getEnd(); void setWordTokens(final List<WordToken> words); List<WordToken> getWordTokens(); boolean contains(final String documentText, final String... needles); String getCoveredText(final String documentText); String getText(); boolean isEmpty();  }
@Test public void testSetWordTokens() { final List<WordToken> list = new ArrayList<>(); pe.setWordTokens(list); Assert.assertSame(list, pe.getWordTokens()); }