UserList implements Serializable { public List getUsers() { List users = userManager.getUsers(); Comparator comparator; if (sortColumn.equalsIgnoreCase("birthday")) { comparator = new BeanDateComparator(sortColumn); } else { comparator = new BeanComparator(sortColumn); } if (!ascending) { comparator = new ReverseComparator(comparator); } sort(users, comparator); return users; }  @Autowired void setUserManager(UserManager userManager); String getSortColumn(); void setSortColumn(String sortColumn); boolean isAscending(); void setAscending(boolean ascending); List getUsers();  }
@Test public void testSearch() throws Exception { assertTrue(bean.getUsers().size() >= 1); }