assertTrue(users.isEmpty());
}
@Test
public void searchByMembership() {
MembershipCond membershipCond = new MembershipCond();
membershipCond.setRoleId(1L);
List<SyncopeUser> users = searchDAO.search(
EntitlementUtil.getRoleIds(entitlementDAO.findAll()), SearchCond.getLeafCond(membershipCond),
SubjectType.USER);
assertNotNull(users);
assertEquals(2, users.size());
membershipCond = new MembershipCond();
membershipCond.setRoleId(5L);
users = searchDAO.search(
EntitlementUtil.getRoleIds(entitlementDAO.findAll()), SearchCond.getNotLeafCond(membershipCond),
SubjectType.USER);
assertNotNull(users);