@Test
public void testGetPolicyList() {

    ZMSClient client = createClient(systemAdminUser);
    ZMSRDLGeneratedClient c = Mockito.mock(ZMSRDLGeneratedClient.class);
    client.setZMSRDLGeneratedClient(c);
    PolicyList policyListMock = Mockito.mock(PolicyList.class);
    Mockito.when(c.getPolicyList("PolicyListDom1", null, null)).thenReturn(policyListMock);
    client.getPolicyList("PolicyListDom1", null, null);
    try {
        Mockito.when(c.getPolicyList("PolicyListDom2", null, null)).thenThrow(new ResourceException(204));
        client.getPolicyList("PolicyListDom2", null, null);
        fail();
    } catch  (ResourceException ex) {
        assertTrue(true);
    }
    try {
        Mockito.when(c.getPolicyList("PolicyListDom3", null, null)).thenThrow(new ResourceException(204));
        client.getPolicyList("PolicyListDom3");
        fail();
    } catch (ResourceException ex) {
        assertTrue(true);
    }
    try {
        Mockito.when(c.getPolicyList("PolicyListDom4", null, null)).thenThrow(new NullPointerException());
        client.getPolicyList("PolicyListDom4");
        fail();
    } catch (ResourceException ex) {
        assertTrue(true);
    }
    try {
        Mockito.when(c.getPolicyList("PolicyListDom5", null, null)).thenThrow(new NullPointerException());
        client.getPolicyList("PolicyListDom5", null, null);
        fail();
    } catch (ResourceException ex) {
        assertTrue(true);
    }
}