UserList extends BasePage implements Serializable { public List getUsers() { try { return sort(userManager.search(query)); } catch (SearchException se) { addError(se.getMessage()); return sort(userManager.search(query)); } } UserList(); void setQuery(String query); String getQuery(); List getUsers(); String search();  }
@Test public void testListUsers() throws Exception { assertTrue(bean.getUsers().size() >= 1); assertFalse(bean.hasErrors()); }