stmt.executeUpdate("insert into connection values(99999,1,1,'connectionTest')");
stmt.executeUpdate("insert into mapping values(99999,99999,'mappingTest','tableTest')");
stmt.executeUpdate("insert into rowAlias values(99999,99999,'aliasTest',1,3)");
RowAliasDAO rowAliasDAO = new RowAliasDAO();
RowAlias rowAlias = new RowAlias();
rowAliasDAO.session = com.googlecode.s2hibernate.struts2.plugin.util.HibernateSessionFactory
.getNewSession();
rowAlias = rowAliasDAO.findById(99999l);
assertEquals(rowAlias.getValueType().getId(), 1l);
assertEquals(rowAlias.getLength().intValue(), 3);
assertEquals(rowAlias.getAlias(), "aliasTest");
assertEquals(rowAlias.getMapping().getId(), 99999l);
stmt.executeUpdate("delete from rowAlias where id=" + 99999);
stmt.executeUpdate("delete from mapping where id=" + 99999);
stmt.executeUpdate("delete from connection where id=" + 99999);
rowAliasDAO.session.close();