@Test
public void testGetDomainList() {

    ZMSClient client = createClient(systemAdminUser);
    ZMSRDLGeneratedClient c = Mockito.mock(ZMSRDLGeneratedClient.class);
    client.setZMSRDLGeneratedClient(c);
    try {
        Mockito.when(c.getDomainList(null, null, null, null, null, null, "MemberRole1", "RoleName1", null))
                .thenThrow(new NullPointerException());
        client.getDomainList("MemberRole1", "RoleName1");
        fail();
    } catch (ResourceException ex) {
        assertTrue(true);
    }
    try {
        Mockito.when(c.getDomainList(null, null, null, null, null, null, "MemberRole2", "RoleName2", null))
                .thenThrow(new ResourceException(400));
        client.getDomainList("MemberRole2", "RoleName2");
        fail();
    } catch (ResourceException ex) {
        assertTrue(true);
    }
}