DefaultModelManager implements ModelManager { @Override public List<Role> findRoles() { List<Role> roleList; try { roleList = createRoles(ldapDao.getDirectChildren(DnFactory.roles())); } catch (NoSuchNodeException | MissingParentException e) { LOGGER.error("LDAP exception", e); throw new LdapRuntimeException(e); } return roleList; } DefaultModelManager(LdapDao ldapDao); @Override List<User> findUsers(); @Override List<Assignment> findAssignments(); @Override List<Project> findProjects(); @Override List<Role> findRoles();  }
@Test @Ignore public void testFindRoles() throws InterruptedException { Role role = createTestRole(); List<Role> expected = Arrays.asList(role); ldapService.updateRoles(expected); assertTrue(CollectionUtils.isEqualCollection(modelManager.findRoles(), expected)); }