public static AthenzIdentity from(AthenzDomain domain, String identityName) {
        if (domain.equals(USER_PRINCIPAL_DOMAIN)) {
            return AthenzUser.fromUserId(identityName);
        } else {
            return new AthenzService(domain, identityName);
        }
    }
@Test
    void athenz_identity_is_parsed_from_dot_separated_string() {
        AthenzIdentity expectedIdentity = new AthenzService(new AthenzDomain("my.subdomain"), "myservicename");
        String fullName = expectedIdentity.getFullName();
        AthenzIdentity actualIdentity = AthenzIdentities.from(fullName);
        assertEquals(expectedIdentity, actualIdentity);
    }