StringList extends ArrayList<String> { public void readFromString(final String string) { readFromString(string, DEFAULT_DELIMITER); }  String writeToString(); String writeToString(final String delimiter); void readFromString(final String string); void readFromString(final String string, final String delimiter);  }
@Test public void testReadFromString() { stringList.readFromString(null); assertEquals(0, stringList.size()); stringList.readFromString(""); assertEquals(0, stringList.size()); stringList.readFromString(STRING_1_ELEMENT); assertEquals(1, stringList.size()); assertEquals(STRING_A1, stringList.get(0)); stringList.readFromString(STRING_2_ELEMENTS); assertEquals(2, stringList.size()); assertEquals(STRING_A1, stringList.get(0)); assertEquals(STRING_A2, stringList.get(1)); stringList.readFromString(STRING_3_ELEMENTS); assertEquals(3, stringList.size()); assertEquals(STRING_A1, stringList.get(0)); assertEquals(STRING_A2, stringList.get(1)); assertEquals(STRING_A3, stringList.get(2)); }