{{{ public class TestDbUnit extends DatabaseTestCase{ public static final String TABLE_LOGIN = "login"; private FlatXmlDataSet loadedDataSet; protected IDatabaseConnection getConnection() throws Exception{ Class.forName("com.mysql.jdbc.Driver"); Connection jdbcConnection = DriverManager.getConnection("jdbc:mysql://locatlhost:3306"); return new DatabaseConnection(jdbcConnection); } protected IDataSet getDataSet() throws Exception{ loadedDataSet = new FlatXmlDataSet(this.getClass().getResourceAsStream("input.xml")); return loadedDataSet; } public void testCheckLoginDataLoaded() throws Exception{ assertNotNull(loadedDataSet); int rowCount = loadedDataSet.getTable(TABLE_LOGIN).getRowCount(); assertEquals(3,rowCount); } } }}}