@Test
public void testGetProviderResourceGroupRoles() {

    ZMSClient client = createClient(systemAdminUser);
    ZMSRDLGeneratedClient c = Mockito.mock(ZMSRDLGeneratedClient.class);
    client.setZMSRDLGeneratedClient(c);
    try {
        Mockito.when(c.getProviderResourceGroupRoles("tenantDomain", "providerDomain", "providerServiceName",
                "resourceGroup")).thenThrow(new NullPointerException());
        client.getProviderResourceGroupRoles("tenantDomain", "providerDomain", "providerServiceName",
                "resourceGroup");
        fail();
    } catch (ResourceException ex) {
        assertTrue(true);
    }
    try {
        Mockito.when(c.getProviderResourceGroupRoles("tenantDomain2", "providerDomain2", "providerServiceName2",
                "resourceGroup2")).thenThrow(new ResourceException(400));
        client.getProviderResourceGroupRoles("tenantDomain2", "providerDomain2", "providerServiceName2",
                "resourceGroup2");
        fail();
    } catch (ResourceException ex) {
        assertTrue(true);
    }
}