VisualizationFacadeEjb implements VisualizationFacade { @Override public String buildTransmissionChainJson( Date fromDate, Date toDate, RegionReferenceDto region, DistrictReferenceDto district, Collection<Disease> diseases, Language language) { String rExecutable = configFacade.getRScriptExecutable(); if (StringUtils.isBlank(rExecutable)) { return null; } Path tempBasePath = new File(configFacade.getTempFilesPath()).toPath(); Collection<Long> contactIds = getContactIds(fromDate, toDate, region, district, diseases); if (contactIds.isEmpty()) { return null; } Path domainXmlPath = Paths.get("domain.xml"); return buildTransmissionChainJson(rExecutable, tempBasePath, domainXmlPath, contactIds, language); }  @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 @Ignore public void testStaticBuildTransmissionChainJson() { List<Long> contactIds = Arrays.asList(30481L, 30478L); String[] rscriptExecutableLocs = { "C:\\Program Files\\R\\R-3.6.2\\bin\\Rscript.exe", "C:\\Program Files\\R\\R-3.6.3\\bin\\Rscript.exe" }; Optional<String> rscriptExecutable = Arrays.stream(rscriptExecutableLocs).filter(p -> Files.isExecutable(Paths.get(p))).findFirst(); rscriptExecutable.ifPresent(r -> { Path domainXmlPath = writeDomainXml(); String result = VisualizationFacadeEjb.buildTransmissionChainJson(r, temp.getRoot().toPath(), domainXmlPath, contactIds, Language.EN); assertThat(result, startsWith("{")); assertThat(result, endsWith("}")); }); }