X509CertUtils { public static String extractRequestInstanceIdFromURI(final List<String> uriList) { for (String uri : uriList) { if (!uri.startsWith(ZTSConsts.ZTS_CERT_INSTANCE_ID_URI)) { continue; } int idx = uri.substring(ZTSConsts.ZTS_CERT_INSTANCE_ID_URI.length()).indexOf('/'); if (idx != -1) { return uri.substring(ZTSConsts.ZTS_CERT_INSTANCE_ID_URI.length() + idx + 1); } } return null; }  static String extractRequestInstanceIdFromURI(final List<String> uriList); static String extractItemFromURI(final List<String> uriList, final String item); static String extractRequestInstanceIdFromDnsNames(final List<String> dnsNames); static String extractRequestInstanceId(X509Certificate cert); static void logCert(final Logger certLogger, final Principal principal,
                final String ip, final String provider, final String instanceId,
                final X509Certificate x509Cert); static void logSSH(final Logger certLogger, final Principal principal, final String ip,
            final String service, final String instanceId); static String logRecord(final Principal principal, final String ip, final String provider,
            final String instanceId, final X509Certificate x509Cert);  }
@Test public void extractReqeustInstanceIdFromURI() { List<String> uriList = new ArrayList<>(); assertNull(X509CertUtils.extractRequestInstanceIdFromURI(uriList)); uriList.add("spiffe: assertNull(X509CertUtils.extractRequestInstanceIdFromURI(uriList)); uriList.add("athenz: assertNull(X509CertUtils.extractRequestInstanceIdFromURI(uriList)); uriList.add("athenz: assertEquals(X509CertUtils.extractRequestInstanceIdFromURI(uriList), "id-001"); }