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