### Question:
ESClientFactory extends GenericClientFactory { @Override public void initialize(Map<String, Object> puProperties) { this.externalProperties = puProperties; this.propertyReader = new ESClientPropertyReader(externalProperties, kunderaMetadata.getApplicationMetadata() .getPersistenceUnitMetadata(getPersistenceUnit())); propertyReader.read(getPersistenceUnit()); }  @Override SchemaManager getSchemaManager(Map<String, Object> puProperties); @Override void destroy(); @Override void initialize(Map<String, Object> puProperties); @Override boolean isThreadSafe();  }### Answer:
@Test public void test() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { ESClientFactory esFactory = new ESClientFactory(); Map<String, Object> props = new HashMap<String, Object>(); props.put(PersistenceProperties.KUNDERA_NODES, "localhost"); props.put(PersistenceProperties.KUNDERA_PORT, "9300"); Field f = esFactory.getClass().getSuperclass().getDeclaredField("persistenceUnit"); if (!f.isAccessible()) { f.setAccessible(true); } f.set(esFactory, persistenceUnit); Method m = GenericClientFactory.class.getDeclaredMethod("setKunderaMetadata", KunderaMetadata.class); if (!m.isAccessible()) { m.setAccessible(true); } m.invoke(esFactory, ((EntityManagerFactoryImpl) emf).getKunderaMetadataInstance()); esFactory.initialize(props); Assert.assertNotNull(esFactory.getClientInstance()); }