IDataSet actualDataSet = new DefaultDatabaseTester(
new DatabaseConnection(_jdo.getConnectionFactory()
.createConnection())).getConnection().createDataSet(
new String[] { tablename1, tablename2 });
IDataSet expectedDataSet = new XmlDataSet(new FileInputStream(
getClass().getResource(datasetlocation).getFile()));
Assertion.assertEquals(expectedDataSet, actualDataSet);
ITable actualTable = actualDataSet.getTable(tablename1);
ITable expectedTable = expectedDataSet.getTable(tablename1);
Assertion.assertEquals(expectedTable, actualTable);
actualTable = actualDataSet.getTable(tablename2);
expectedTable = expectedDataSet.getTable(tablename2);
Assertion.assertEquals(expectedTable, actualTable);
}