assertTrue("book_id column is auto inc", bookColumn.isAutoIncrement()); assertTrue("book_id column is primary key", bookColumn.isPrimaryKey());
*/
    public void testParseMetadata() throws Exception {        // first load up the metadata for this database.        Connection connection = getConnection();        try {            JdbcModelReader modelReader = new JdbcModelReader(connection);                testDatabase = modelReader.getDatabase();        }        finally {            try {                connection.close();            }            catch (Exception e) {                log.error("Caught exception closing connection: " + e, e);            }        }        assertTrue(            "Src Database contains a table 'author'",            database.findTable("author") != null);        assertTrue(            "Test Database contains a table 'book'",            testDatabase.findTable("book") != null);        assertTrue(            "Test Database contains correct number of tables",            testDatabase.getTables().size() == database.getTables().size());        for (Iterator i = testDatabase.getTables().iterator(); i.hasNext();) {            Table testTable = (Table) i.next();            Table srcTable = database.findTable(testTable.getName());            assertTrue("srcTable was found", srcTable != null);            assertTrue(                "srcTable matches testTable",                srcTable.getName().equalsIgnoreCase(testTable.getName()));            assertTrue(                "Table columns match",                testTable.getColumns().size() == srcTable.getColumns().size());            //todo: not imple            //assertTrue( "Table indexes match", testTable.getIndexes().size() == srcTable.getIndexes().size() );            doImportForeignKeys(srcTable, testTable);            doImportPrimaryKeyColumns(srcTable, testTable);        }        Table bookTable = database.findTable("book");        Column bookColumn = bookTable.findColumn("book_id");        assertTrue("book_id column is required", bookColumn.isRequired());        assertTrue("book_id column is auto inc", bookColumn.isAutoIncrement());        assertTrue("book_id column is primary key", bookColumn.isPrimaryKey());    }