@Test
public void testGetRoleAccess() {

    ZTSRDLClientMock ztsClientMock = new ZTSRDLClientMock();
    Principal principal = SimplePrincipal.create("user_domain", "user",
            "v=S1;d=user_domain;n=user;s=sig", PRINCIPAL_AUTHORITY);
    ZTSClient client = new ZTSClient("http://localhost:4080", principal);
    client.setZTSRDLGeneratedClient(ztsClientMock);
    RoleAccess roleAccess = client.getRoleAccess("coretech", "user.joe");
    List<String> roles = roleAccess.getRoles();
    assertEquals(roles.size(), 2);
    assertTrue(roles.contains("role1"));
    try {
        client.getRoleAccess("exc", "user.joe");
        fail();
    } catch (ZTSClientException ex) {
        assertEquals(ex.getCode(), 400);
    }
    try {
        client.getRoleAccess("unknown", "user.joe");
        fail();
    } catch (ZTSClientException ex) {
        assertEquals(ex.getCode(), 404);
    }
    client.close();
}