public void testGetObjectId() {
EntityManagerImpl em = (EntityManagerImpl) emf.createEntityManager();
Broker broker = em.getBroker();
em.getTransaction().begin();
A a = new A();
em.persist(a);
Object oidInPersistenceContext = broker.getObjectId(a);
em.getTransaction().commit();
em.clear();
Object oidDetached = broker.getObjectId(a);
em.close();
em = (EntityManagerImpl) emf.createEntityManager();
broker = em.getBroker();
A a2 = new A();
a2.setId(a.getId());
Object oidDetachedNoSm = broker.getObjectId(a2);
assertTrue(oidInPersistenceContext.equals(oidDetached));
assertTrue(oidDetached.equals(oidDetachedNoSm));