JAXBService { static Set<String> getPackagesToScan() { Set<String> packages = new HashSet<>(); String sysProperty = SystemPropertyHelper.getProperty(SystemPropertyHelper.PACKAGES_TO_SCAN); if (sysProperty != null) { packages = Arrays.stream(sysProperty.split(",")).collect(Collectors.toSet()); } else { packages.add("*"); } return packages; } JAXBService(Class<?>... xsdRootClasses); static JAXBService create(Class<?>... xsdClasses); static JAXBService createWithValidation(Class<?>... xsdClasses); void validateWithLocalCacheXSD(); String marshall(Object object); T unMarshall(String xml); T unMarshall(String xml, Class<T> klass);  }
@Test public void getPackagesToScanWithoutSystemProperty() { Set<String> packages = JAXBService.getPackagesToScan(); assertThat(packages).containsExactly("*"); }
@Test public void getPackagesToScanWithSystemProperty() { System.setProperty("geode." + SystemPropertyHelper.PACKAGES_TO_SCAN, "org.apache.geode,io.pivotal"); Set<String> packages = JAXBService.getPackagesToScan(); assertThat(packages).containsExactly("org.apache.geode", "io.pivotal"); }