@Test
public void testValidateProviderResourceGroupRolesObject() {

    List<TenantRoleAction> list = new ArrayList<>();
    list.add(new TenantRoleAction().setRole("role").setAction("action"));
    ProviderResourceGroupRoles roles = new ProviderResourceGroupRoles()
            .setTenant("tenant").setDomain("domain").setResourceGroup("resourcegroup")
            .setService("service").setRoles(list);
    assertTrue(zms.validateProviderResourceGroupRolesObject(roles, "domain", "service",
            "tenant", "resourcegroup"));
    assertFalse(zms.validateProviderResourceGroupRolesObject(roles, "domain1", "service",
            "tenant", "resourcegroup"));
    assertFalse(zms.validateProviderResourceGroupRolesObject(roles, "domain", "service1",
            "tenant", "resourcegroup"));
    assertFalse(zms.validateProviderResourceGroupRolesObject(roles, "domain", "service",
            "tenant1", "resourcegroup"));
    assertFalse(zms.validateProviderResourceGroupRolesObject(roles, "domain", "service",
            "tenant", "resourcegroup1"));
    list.clear();
    assertFalse(zms.validateProviderResourceGroupRolesObject(roles, "domain", "service",
            "tenant", "resourcegroup"));
    roles.setRoles(null);
    assertFalse(zms.validateProviderResourceGroupRolesObject(roles, "domain", "service",
            "tenant", "resourcegroup"));
}