public void testPublicExtendedPersistenceContextSetterWithEntityManagerInfoAndSerialization() throws Exception {
EntityManager mockEm = mock(EntityManager.class, withSettings().serializable());
given(mockEm.isOpen()).willReturn(true);
EntityManagerFactoryWithInfo mockEmf = mock(EntityManagerFactoryWithInfo.class);
given(mockEmf.getNativeEntityManagerFactory()).willReturn(mockEmf);
given(mockEmf.getJpaDialect()).willReturn(new DefaultJpaDialect());
given(mockEmf.getEntityManagerInterface()).willReturn((Class)EntityManager.class);
given(mockEmf.getBeanClassLoader()).willReturn(getClass().getClassLoader());
given(mockEmf.createEntityManager()).willReturn(mockEm);
GenericApplicationContext gac = new GenericApplicationContext();