### Question:
KunderaCoreUtils { public static Map<String, Object> getExternalProperties(String pu, Map<String, Object> externalProperties, String... persistenceUnits) { Map<String, Object> puProperty; if (persistenceUnits != null && persistenceUnits.length > 1 && externalProperties != null) { puProperty = (Map<String, Object>) externalProperties.get(pu); if (puProperty != null) { return fetchPropertyMap(puProperty); } return null; } return externalProperties; }  static Map<String, Object> getExternalProperties(String pu, Map<String, Object> externalProperties,
            String... persistenceUnits); static boolean isEmptyOrNull(Object o); static String prepareCompositeKey(final EntityMetadata m, final Object compositeKey); static String prepareCompositeKey(final SingularAttribute attribute, final MetamodelImpl metaModel,
            final Object compositeKey); static String resolvePath(String input); static int countNonSyntheticFields(Class<?> clazz); static String getLuceneQueryFromJPAQuery(final KunderaQuery kunderaQuery,
            final KunderaMetadata kunderaMetadata); static boolean isShowQueryEnabled(final Map<String, Object> properties, final String persistenceUnit,
            final KunderaMetadata kunderaMetadata); static void printQuery(String query, boolean showQuery); static void printQueryWithFilterClause(Queue filterClausequeue, String tableName); static Object getEntity(Object e); static Object initialize(EntityMetadata m, Object entity, Object id); static Object initialize(Class clazz, Object record); static Object createNewInstance(Class clazz); static String getJPAColumnName(String field, EntityMetadata entityMetadata, MetamodelImpl metaModel);  }### Answer:
@Test public void getExternalProperties() { Map<String, Object> propertiesMap = new HashMap<String, Object>(); String[] persistenceUnits = new String[] { "metaDataTest", "patest" }; Assert.assertNull(KunderaCoreUtils.getExternalProperties("patest", propertiesMap, persistenceUnits)); Assert.assertTrue(KunderaCoreUtils.getExternalProperties("patest", propertiesMap, null).isEmpty()); Map<String, Object> puProperties = new HashMap<String, Object>(); puProperties.put(PersistenceProperties.KUNDERA_DDL_AUTO_PREPARE, "create"); propertiesMap.put("patest", puProperties); Map<String, Object> persistenceUnitProps = KunderaCoreUtils.getExternalProperties("patest", propertiesMap, persistenceUnits); Assert.assertNotNull(persistenceUnitProps); Assert.assertEquals(puProperties, persistenceUnitProps); propertiesMap.put("patest", null); Assert.assertNull(KunderaCoreUtils.getExternalProperties("patest", propertiesMap, persistenceUnits)); }