CertificateIdentity { public String getPrincipalName() { return AthenzUtils.getPrincipalName(this.domain, this.service); } CertificateIdentity(String domain, String service, List<String> roles, X509Certificate x509Certificate); String getPrincipalName(); String getDomain(); String getService(); List<String> getRoles(); X509Certificate getX509Certificate(); @Override String toString();  }
@Test public void testGetPrincipalName() throws Exception { CertificateIdentity certId = new CertificateIdentity("domain", "service", null, null); assertNotNull(certId); assertEquals(certId.getPrincipalName(), "domain.service"); assertNull(certId.getRoles()); assertNull(certId.getX509Certificate()); }