public void verifyDeleteDetectionOnRefresh(boolean useDataCache,
boolean dirty, LockModeType lock, Class<?> expectedExceptionType) {
OpenJPAEntityManagerFactorySPI emf = (useDataCache)
? emfWithDataCache : emfWithoutDataCache;
OpenJPAEntityManagerSPI em = emf.createEntityManager();
em.getTransaction().begin();
PObject pc = new PObject();
pc.setName(useDataCache ? MARKER_DATACACHE : MARKER_CACHE);
em.persist(pc);