@Test
public void testExecutePutMembershipTrustRole() {

    String domainName = "putmbrtrustrole";
    String roleName = "role1";
    
    TopLevelDomain dom1 = createTopLevelDomainObject(domainName,
            "Test Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom1);
    
    Role role1 = createRoleObject(domainName, roleName, "sys.auth",
            null, null);
    zms.putRole(mockDomRsrcCtx, domainName, roleName, auditRef, role1);
    
    try {
        zms.dbService.executePutMembership(mockDomRsrcCtx, domainName, roleName,
                new RoleMember().setMemberName("user.doe"), auditRef, "putMembership");
        fail();
    } catch (ResourceException ex) {
        assertEquals(ex.getCode(), 400);
    }
    zms.deleteTopLevelDomain(mockDomRsrcCtx, domainName, auditRef);
}