*/
public void verifyRefresh(boolean useDataCache, LockModeType lock,
boolean makeDirtyBeforeRefresh, boolean refreshFromDataCache,
String expected) {
OpenJPAEntityManagerFactorySPI emf = (useDataCache)
? emfWithDataCache : emfWithoutDataCache;
emf.getConfiguration().setRefreshFromDataCache(refreshFromDataCache);
OpenJPAEntityManagerSPI em = emf.createEntityManager();
em.getTransaction().begin();
PObject pc = new PObject();
pc.setName(useDataCache ? MARKER_DATACACHE : MARKER_CACHE);
em.persist(pc);
em.getTransaction().commit();
Object oid = pc.getId();
StoreCache dataCache = emf.getStoreCache();
assertEquals(useDataCache, dataCache.contains(PObject.class, oid));
// Modify the record in the database in a separate transaction using
// native SQL so that the in-memory instance is not altered
em.getTransaction().begin();