VisualizationFacadeEjb implements VisualizationFacade { static Map<String, String> getConnectionPoolProperties(Path domPath, String jndiName) throws IOException { final Parser parser = Parser.xmlParser(); final org.jsoup.nodes.Document doc; try (Reader rd = Files.newBufferedReader(domPath)) { doc = parser.parseInput(rd, ""); } String poolName = doc.selectFirst("jdbc-resource[jndi-name=\"" + jndiName + "\"]").attr("pool-name"); Map<String, String> dbProperties = doc.select("jdbc-connection-pool[name=\"" + poolName + "\"] > property") .stream() .collect(Collectors.toMap(e -> e.attr("name"), e -> e.attr("value"))); return dbProperties; }  @Override String buildTransmissionChainJson(
		Date fromDate,
		Date toDate,
		RegionReferenceDto region,
		DistrictReferenceDto district,
		Collection<Disease> diseases,
		Language language); @Override Long getContactCount(Date fromDate, Date toDate, RegionReferenceDto region, DistrictReferenceDto district, Collection<Disease> diseases);  }
@Test public void testReadDbConection() throws IOException { Path domainXmlPath = writeDomainXml(); Map<String, String> dbProperties = VisualizationFacadeEjb.getConnectionPoolProperties(domainXmlPath, VisualizationFacadeEjb.SORMAS_DATA_POOL_JNDI); assertThat(dbProperties.entrySet(), hasSize(5)); assertThat(dbProperties, Matchers.hasEntry("user", "sormas_user")); assertThat(dbProperties, Matchers.hasEntry("password", "sormas_user")); assertThat(dbProperties, Matchers.hasEntry("portNumber", "5432")); assertThat(dbProperties, Matchers.hasEntry("databaseName", "sormas_db")); assertThat(dbProperties, Matchers.hasEntry("serverName", "localhost")); }