em.getTransaction().commit();
em.clear();
// Find the entity and retrieve the objectId we use internally
BasicEntity persistedEntity = em.find(BasicEntity.class, entity.getId());
StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
Object oid = smi.getObjectId();
assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, entity.getId()));
Object o = JPAFacadeHelper.toOpenJPAObjectId(cmd, entity.getId());
assertEquals(o, JPAFacadeHelper.toOpenJPAObjectId(cmd, o));
}