### Question:
ESClientPropertyReader extends AbstractPropertyReader implements PropertyReader { public Properties getConnectionProperties() { return esmd != null ? esmd.getConnectionProperties() : null; } ESClientPropertyReader(Map externalProperties, final PersistenceUnitMetadata puMetadata); Properties getConnectionProperties();  }### Answer:
@Test public void test() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { Map<String, Client<ESQuery>> clients = (Map<String, Client<ESQuery>>) em.getDelegate(); ESClient client = (ESClient) clients.get(PERSISTENCE_UNIT); Field factoryField = client.getClass().getDeclaredField("factory"); if (!factoryField.isAccessible()) { factoryField.setAccessible(true); } ESClientFactory factory = (ESClientFactory) factoryField.get(client); Field propertyReader = ((ESClientFactory) factory).getClass().getSuperclass() .getDeclaredField("propertyReader"); if (!propertyReader.isAccessible()) { propertyReader.setAccessible(true); } ESClientPropertyReader readerInstance = (ESClientPropertyReader) propertyReader.get(factory); Properties props = readerInstance.getConnectionProperties(); Assert.assertEquals("true", props.get("client.transport.sniff")); Assert.assertEquals("false", props.get("discovery.zen.ping.multicast.enabled")); Assert.assertEquals("true", props.get("discovery.zen.ping.unicast.enabled")); Assert.assertEquals("false", props.get("discovery.zen.multicast.enabled")); Assert.assertEquals("true", props.get("discovery.zen.unicast.enabled")); }