### Question:
ScatterPlotDataset extends AbstractXYDataset implements TaskListener { public void taskEvent(TaskEvent event) { if(event.getType() == EventType.TASK_PROGRESS) { d_itemCount = ((TaskProgressEvent)event).getIteration(); fireDatasetChanged(); } } ScatterPlotDataset(LyndOBrienModel model); @Override int getSeriesCount(); @Override Comparable<?> getSeriesKey(int series); int getItemCount(int series); Number getX(int series, int item); Number getY(int series, int item); void taskEvent(TaskEvent event);  }### Answer:
@Test public void testDataSetChangedOnSimulationProgress() { ScatterPlotDataset set = new ScatterPlotDataset(d_model); DatasetChangeListener mock = createStrictMock(DatasetChangeListener.class); mock.datasetChanged((DatasetChangeEvent)anyObject()); replay(mock); set.addChangeListener(mock); set.taskEvent(new TaskProgressEvent(d_model.getTask(), 100, 3000)); verify(mock); }