AthenzUtils { public static List<String> splitCommaSeperatedSystemProperty(String property) { String propertyListStr = System.getProperty(property, null); if (propertyListStr == null) { return new ArrayList<>(); } return Stream.of(propertyListStr.trim().split("\\s*,\\s*")).collect(Collectors.toList()); } private  AthenzUtils(); static String extractServicePrincipal(X509Certificate x509Cert); static boolean isRoleCertificate(X509Certificate x509Cert); static String extractRoleName(final String roleName); static String extractRoleDomainName(final String roleName); static String extractPrincipalDomainName(final String principalName); static String extractPrincipalServiceName(final String principalName); static String[] splitPrincipalName(String name); static String getPrincipalName(String domain, String service); static List<String> splitCommaSeperatedSystemProperty(String property);  }
@Test public void testSplitCommaSeperatedSystemProperty() { String systemProperty = "athenz.zts.notification_cert_fail_ignored_services_list"; System.setProperty(systemProperty, "aaa, bbb, ccc"); List<String> values = AthenzUtils.splitCommaSeperatedSystemProperty(systemProperty); assertEquals(3, values.size()); assertEquals("aaa", values.get(0)); assertEquals("bbb", values.get(1)); assertEquals("ccc", values.get(2)); List<String> values2 = AthenzUtils.splitCommaSeperatedSystemProperty("unset.property"); assertEquals(new ArrayList<>(), values2); System.clearProperty(systemProperty); }