@Test
public void testExecutePutTenantRoles() {

    
    String tenantDomain = "tenantadminpolicy";
    String providerDomain = "coretech";
    String providerService = "storage";
    // create domain for tenant
    
    TopLevelDomain dom1 = createTopLevelDomainObject(tenantDomain,
            "Test Tenant Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom1);
    // create domain for provider
    
    TopLevelDomain domProv = createTopLevelDomainObject(providerDomain,
            "Test Provider Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, domProv);
    // create service identity for providerDomain.providerService
    
    ServiceIdentity service = createServiceObject(
            providerDomain, providerService, "http://localhost:8090/tableprovider",
            "/usr/bin/java", "root", "users", "localhost");
    zms.putServiceIdentity(mockDomRsrcCtx, providerDomain, providerService, auditRef, service);
    Tenancy tenant = new Tenancy();
    tenant.setDomain(tenantDomain);
    tenant.setService("coretech.storage");
    
    zms.putTenancy(mockDomRsrcCtx, tenantDomain, "coretech.storage", auditRef, tenant);
    
    List<TenantRoleAction> roleActions = new ArrayList<>();
    for (Struct.Field f : TABLE_PROVIDER_ROLE_ACTIONS) {
        roleActions.add(new TenantRoleAction().setRole(f.name()).setAction(
                (String) f.value()));
    }
    zms.dbService.executePutTenantRoles(mockDomRsrcCtx, providerDomain, providerService,
            tenantDomain, null, roleActions, auditRef, "putTenantRoles");
    zms.deleteTenancy(mockDomRsrcCtx, tenantDomain, "coretech.storage", auditRef);
    
    zms.deleteTopLevelDomain(mockDomRsrcCtx, tenantDomain, auditRef);
    zms.deleteTopLevelDomain(mockDomRsrcCtx, providerDomain, auditRef);
}