Map<String, PersistenceUnitConfigurer> configurerMap = CollectionFactory
.<String, PersistenceUnitConfigurer>newMap();
configurerMap.put("defaultpropertytest", configurer);
EntityManagerSourceImpl emSource = new EntityManagerSourceImpl(
LoggerFactory.getLogger(EntityManagerSourceImplTest.class), new ClasspathResource(
"single-persistence-unit.xml"), null, configurerMap);
EntityManager em = emSource.createEntityManagerFactory("defaultpropertytest")
.createEntityManager();
assertEquals(em.getProperties().get("MYKEY"), "MYVALUE");
}