### Question:
KunderaPersistence implements PersistenceProvider { @Override public synchronized final EntityManagerFactory createEntityManagerFactory(String persistenceUnit, Map map) { synchronized (this) { try { EntityManagerFactory emf = new EntityManagerFactoryImpl(persistenceUnit, map); return emf; } catch (PersistenceUnitConfigurationException pcex) { logger.error("EntityManagerFactory not created, returning null."); return null; } } } KunderaPersistence(); @Override final EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map map); @Override synchronized final EntityManagerFactory createEntityManagerFactory(String persistenceUnit, Map map); @Override ProviderUtil getProviderUtil(); PersistenceUtilHelper.MetadataCache getCache(); @Override void generateSchema(PersistenceUnitInfo arg0, Map arg1); @Override boolean generateSchema(String arg0, Map arg1);  }### Answer:
@Test public void testCreateEMFWithNullPu() { KunderaPersistence persistence = new KunderaPersistence(); try { EntityManagerFactory emf = persistence.createEntityManagerFactory(null, null); Assert.fail("Should have gone to catch block!"); } catch (KunderaException kex) { Assert.assertEquals("Persistence unit name should not be null", kex.getMessage()); } }