@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());
}