List<String> ids = (List<String>) q.getResultList();
assertEquals(2, ids.size());
assertEquals(KeyFactory.keyToString(e1.getKey()), ids.get(0));
assertEquals(KeyFactory.keyToString(e2.getKey()), ids.get(1));
Book b = em.find(Book.class, e1.getKey());
assertEquals("author", b.getAuthor());
b.setAuthor("not author");
commitTxn();
beginTxn();
b = em.find(Book.class, e1.getKey());
assertEquals("not author", b.getAuthor());
commitTxn();
}