@Test
public void testExtractRoleDomainName() {

    assertEquals(AthenzUtils.extractRoleDomainName("athenz:role.readers"), "athenz");
    assertEquals(AthenzUtils.extractRoleDomainName("athenz.api:role.readers"), "athenz.api");
    assertEquals(AthenzUtils.extractRoleDomainName("athenz.api.test:role.readers"), "athenz.api.test");
    assertNull(AthenzUtils.extractRoleDomainName("athenz.role.readers"));
    assertNull(AthenzUtils.extractRoleDomainName("athenz:roles.readers"));
    assertNull(AthenzUtils.extractRoleDomainName("athenz:role."));
    assertNull(AthenzUtils.extractRoleDomainName(":role.readers"));
    assertNull(AthenzUtils.extractRoleDomainName("athenz.readers"));
}