public void testInsertPerson() throws Exception {
Connection conn = null;
try {
conn = ConnectionFactoryForUnitTests.getDedicatedConnection();
PersonDvo dvo = new PersonDvo();
dvo.setDisplayName("Mr. Insert Unit Test");
Dao.insert(dvo, dvo, conn);
Dao.setPrimaryKeys(dvo, dvo, conn);
System.out.println("New user inserted.");
String pk = dvo.getPersonId();
System.out.println("The new user was assigned the synthetic key:");
System.out.println(pk);
assertTrue(pk != null && pk.length() > 0);
System.out.println("The new user has the following name:");
System.out.println(dvo.getDisplayName());
assertTrue("Mr. Insert Unit Test".equals(dvo.getDisplayName()));
dvo.setDisplayName("Mr. Update Unit Test");
Dao.update(dvo, dvo, conn);
assertTrue("Mr. Update Unit Test".equals(dvo.getDisplayName()));
conn.rollback();
System.out.println("Done with insert and update test.");
} finally {
if(conn != null) {
conn.close();