LookupManagerImpl implements LookupManager { public List<LabelValue> getAllRoles() { List<Role> roles = dao.getRoles(); List<LabelValue> list = new ArrayList<LabelValue>(); for (Role role1 : roles) { list.add(new LabelValue(role1.getName(), role1.getName())); } return list; }  List<LabelValue> getAllRoles();  }
@Test public void testGetAllRoles() { log.debug("entered 'testGetAllRoles' method"); Role role = new Role(Constants.ADMIN_ROLE); final List<Role> testData = new ArrayList<Role>(); testData.add(role); given(lookupDao.getRoles()).willReturn(testData); List<LabelValue> roles = mgr.getAllRoles(); assertTrue(roles.size() > 0); }