@Test
public void testGetRoleList() {

    ZMSClient client = createClient(systemAdminUser);
    ZMSRDLGeneratedClient c = Mockito.mock(ZMSRDLGeneratedClient.class);
    client.setZMSRDLGeneratedClient(c);
    RoleList roleListMock = Mockito.mock(RoleList.class);
    Mockito.when(c.getRoleList("RoleListParamDom1", null, "Role1")).thenReturn(roleListMock);
    RoleList roleList = client.getRoleList("RoleListParamDom1", null, "Role1");
    assertNotNull(roleList);
    try {
        Mockito.when(c.getRoleList("RoleListParamDom1", null, "Role2")).thenThrow(new ResourceException(204));
        client.getRoleList("RoleListParamDom1", null, "Role2");
        fail();
    } catch  (ResourceException ex) {
        assertTrue(true);
    }
    try {
        Mockito.when(c.getRoleList("RoleListParamDom2", null, "Role2")).thenThrow(new NullPointerException());
        client.getRoleList("RoleListParamDom2", null, "Role2");
        fail();
    } catch (ResourceException ex) {
        assertTrue(true);
    }
    try {
        Mockito.when(c.getRoleList("RoleListParamDom1", null, null)).thenThrow(new ResourceException(204));
        client.getRoleList("RoleListParamDom1");
        fail();
    } catch (ResourceException ex) {
        assertTrue(true);
    }
    try {
        Mockito.when(c.getRoleList("RoleListParamDom2", null, null)).thenThrow(new NullPointerException());
        client.getRoleList("RoleListParamDom2");
        fail();
    } catch (ResourceException ex) {
        assertTrue(true);
    }
}