DefaultDataTableProcessor implements DataTableProcessor { @Override public void process(final DataTable table) { for (final DataRow row : table.getRows()) { childProcessor.process(row); } } DefaultDataTableProcessor(final DataRowProcessor childProcessor); @Override void process(final DataTable table);  }
@Test public void shouldInvokeProcessOnEachChild() { DataTable dt = createDt(r1, r2); new DefaultDataTableProcessor(mockedChildProcessor).process(dt); verify(mockedChildProcessor, times(2)).process(captor.capture()); assertThat(captor.getAllValues(), contains(r1, r2)); }