DataSeries extends AbstractDataSource implements DataListener { @Override public String toString() { return getName(); } DataSeries(DataSource data, int... cols); @SuppressWarnings("unchecked")  DataSeries(String name, DataSource data, int... cols); Comparable<?> get(int col, int row); @Override int getColumnCount(); int getRowCount(); void dataAdded(DataSource source, DataChangeEvent... events); void dataUpdated(DataSource source, DataChangeEvent... events); void dataRemoved(DataSource source, DataChangeEvent... events); @Override String toString();  }
@Test public void testToString() { DataSeries series = new DataSeries("name", table, 2, 1); assertEquals("name", series.toString()); assertEquals(series.getName(), series.toString()); }