@Test
public void testCreateOrUpdate() throws Exception {
Dao<NotQuiteFoo, Integer> dao = createDao(NotQuiteFoo.class, true);
NotQuiteFoo foo1 = new NotQuiteFoo();
foo1.stuff = "wow";
CreateOrUpdateStatus status = dao.createOrUpdate(foo1);
assertTrue(status.isCreated());
assertFalse(status.isUpdated());
assertEquals(1, status.getNumLinesChanged());
String stuff2 = "4134132";
foo1.stuff = stuff2;
status = dao.createOrUpdate(foo1);
assertFalse(status.isCreated());
assertTrue(status.isUpdated());
assertEquals(1, status.getNumLinesChanged());
NotQuiteFoo result = dao.queryForId(foo1.id);
assertEquals(stuff2, result.stuff);
}