### Question:
ApplicationMetadata { public void addEntityMetadata(String persistenceUnit, Class<?> clazz, EntityMetadata entityMetadata) { Metamodel metamodel = getMetamodelMap().get(persistenceUnit); Map<String, EntityMetadata> entityClassToMetadataMap = ((MetamodelImpl) metamodel).getEntityMetadataMap(); if (entityClassToMetadataMap == null || entityClassToMetadataMap.isEmpty()) { entityClassToMetadataMap.put(clazz.getName(), entityMetadata); } else { if (logger.isDebugEnabled()) logger.debug("Entity meta model already exists for persistence unit " + persistenceUnit + " and class " + clazz + ". Noting needs to be done"); } }  void addEntityMetadata(String persistenceUnit, Class<?> clazz, EntityMetadata entityMetadata); void addPersistenceUnitMetadata(Map<String, PersistenceUnitMetadata> metadata); Map<String, Metamodel> getMetamodelMap(); PersistenceUnitMetadata getPersistenceUnitMetadata(String persistenceUnit); Metamodel getMetamodel(String persistenceUnit); Map<String, PersistenceUnitMetadata> getPersistenceUnitMetadataMap(); void setClazzToPuMap(Map<String, List<String>> map); List<String> getMappedPersistenceUnit(Class<?> clazz); String getMappedPersistenceUnit(String clazzName); void addQueryToCollection(String queryName, String query, boolean isNativeQuery, Class clazz); String getQuery(String name); boolean isNative(String name); Class getMappedClass(String name); MetaModelBuilder getMetaModelBuilder(String persistenceUnit);  }### Answer:
@Test public void testAddEntityMetadata() { ((EntityManagerFactoryImpl) emf).getKunderaMetadataInstance().getApplicationMetadata() .addEntityMetadata(persistenceUnit, Article.class, new EntityMetadata(Article.class)); Assert.assertNotNull(KunderaMetadataManager.getEntityMetadata( ((EntityManagerFactoryImpl) emf).getKunderaMetadataInstance(), Article.class)); }