bean = (DynaBean)it.next();
DynaBean bean = (DynaBean)it.next();
    public void testSimpleQuery() throws Exception    {        createDatabase(            "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+            "<database name='ddlutils'>\n"+            "  <table name='TestTable'>\n"+            "    <column name='Id' type='INTEGER' primaryKey='true' required='true'/>\n"+            "    <column name='Text' type='VARCHAR' size='15'/>\n"+            "  </table>\n"+            "</database>");        insertData(            "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+            "<data>\n"+            "  <TestTable Id='1' Text='Text 1'/>\n"+            "  <TestTable Id='2' Text='Text 2'/>\n"+            "  <TestTable Id='3' Text='Text 3'/>"+            "</data>");        ModelBasedResultSetIterator it   = (ModelBasedResultSetIterator)getPlatform().query(getModel(), "SELECT * FROM TestTable");        DynaBean        bean = null;        assertTrue(it.hasNext());        // we call the method a second time to assert that the result set does not get advanced twice        assertTrue(it.hasNext());        bean = (DynaBean)it.next();        assertEquals(new Integer(1),                     getPropertyValue(bean, "Id"));        assertEquals("Text 1",                     getPropertyValue(bean, "Text"));                assertTrue(it.hasNext());        bean = (DynaBean)it.next();        assertEquals(new Integer(2),                     getPropertyValue(bean, "Id"));        assertEquals("Text 2",                     getPropertyValue(bean, "Text"));        assertTrue(it.hasNext());        bean = (DynaBean)it.next();        assertEquals(new Integer(3),                     getPropertyValue(bean, "Id"));        assertEquals("Text 3",                     getPropertyValue(bean, "Text"));        assertFalse(it.hasNext());        assertFalse(it.isConnectionOpen());    }