String update = "UPDATE CachedEntityStatistics s SET s.firstName = :name WHERE s.id = :id";
String name = "name_" + System.currentTimeMillis();
// execute update, this should result in a cache eviction
em.getTransaction().begin();
assertEquals(1, em.createQuery(update).setParameter("name", name).setParameter("id", e.getId())
.executeUpdate());
em.getTransaction().commit();
assertTrue(cache.contains(CachedEntityStatistics.class, e.getId()));
CachedEntityStatistics postUpdate = em.find(CachedEntityStatistics.class, e.getId());