StringList implements Iterable<String> { public String getToken(int index) { return tokens[index]; } StringList(String singleToken);  StringList(String... tokens); String getToken(int index); int size(); Iterator<String> iterator(); boolean compareToIgnoreCase(StringList tokens); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testGetToken() { StringList l = new StringList("a", "b"); assertEquals(2, l.size()); assertEquals("a", l.getToken(0)); assertEquals("b", l.getToken(1)); }