@Test
public void testGetServiceIdentityList() {

    ZMSClient client = createClient(systemAdminUser);
    ZMSRDLGeneratedClient c = Mockito.mock(ZMSRDLGeneratedClient.class);
    client.setZMSRDLGeneratedClient(c);
    ServiceIdentityList serviceListMock = Mockito.mock(ServiceIdentityList.class);
    Mockito.when(c.getServiceIdentityList("ServiceListParamsDom1", null, "Service1")).thenReturn(serviceListMock);
    client.getServiceIdentityList("ServiceListParamsDom1", null, "Service1");
    try {
        Mockito.when(c.getServiceIdentityList("ServiceListParamsDom2", null, "Service1")).thenThrow(new ResourceException(204));
        client.getServiceIdentityList("ServiceListParamsDom2", null, "Service1");
        fail();
    } catch  (ResourceException ex) {
        assertEquals(ex.getCode(), 204);
    }
    Mockito.when(c.getServiceIdentityList("ServiceListParamsDom3", null, null)).thenReturn(serviceListMock);
    client.getServiceIdentityList("ServiceListParamsDom3");
    try {
        Mockito.when(c.getServiceIdentityList("ServiceListParamsDom4", null, null)).thenThrow(new ResourceException(204));
        client.getServiceIdentityList("ServiceListParamsDom4");
        fail();
    } catch  (ResourceException ex) {
        assertEquals(ex.getCode(), 204);
    }
    try {
        Mockito.when(c.getServiceIdentityList("ServiceListParamsDom5", null, null)).thenThrow(new NullPointerException());
        client.getServiceIdentityList("ServiceListParamsDom5");
        fail();
    } catch  (ResourceException ex) {
        assertEquals(ex.getCode(), 400);
    }
}