DbUnitDaleqSupport implements DaleqSupport { @Override public void insertIntoDatabase(final Table... tables) { Preconditions.checkNotNull(insertOperation, "insertOperation"); executeOnDatabase(insertOperation, tables); } DbUnitDaleqSupport(
            final IDataSetFactory dataSetFactory,
            final ConnectionFactory connectionFactory,
            final Asserter asserter); @Override void insertIntoDatabase(final Table... tables); @Override void cleanInsertIntoDatabase(final Table... tables); @Override void assertTableInDatabase(final Table table, final FieldDef... ignoreColumns); @Override void printTable(final Table table, final PrintStream printer);  }
@Test public void insertIntoDatabase_should_insertAnIDataSetWithDbUnit() throws SQLException, DatabaseUnitException { expectConnection(); final Capture<IDataSet> capturedDataset = new Capture<IDataSet>(); insertOperation.execute(eq(connection), capture(capturedDataset)); replayAll(); daleqSupport.insertIntoDatabase(exampleTable); verifyAll(); final IDataSet dataSet = capturedDataset.getValue(); assertThat(dataSet.getTableNames(), arrayContaining("FOO")); final ITable table = dataSet.getTable("FOO"); assertThat(table.getValue(0, "ID"), Matchers.is((Object) "0")); assertThat(table.getValue(0, "VALUE"), Matchers.is((Object) "val0")); assertThat(table.getValue(1, "ID"), Matchers.is((Object) "1")); assertThat(table.getValue(1, "VALUE"), Matchers.is((Object) "val1")); }