### Question:
JpaUserRepository implements UserRepository { @Override public List<User> findByUsernameOrEmail(String searchTerm, int offset, int pageSize) { TypedQuery<JpaUser> query = manager.createNamedQuery(JpaUser.USER_FIND_BY_USERNAME_OR_EMAIL, JpaUser.class); query.setParameter(JpaUser.PARAM_SEARCHTERM, "%" + searchTerm.toLowerCase() + "%"); return CollectionUtils.<User>toBaseTypedList(getPagedResultList(query, offset, pageSize)); }  @Override User getByUsername(String username); @Override User getByUserEmail(String userEmail); @Override User getByOpenId(String openId); @Override List<User> getAll(); @Override List<User> getLimitedList(int offset, int pageSize); @Override int getCountAll(); @Override List<User> findByUsernameOrEmail(String searchTerm, int offset, int pageSize); @Override int getCountByUsernameOrEmail(String searchTerm); @Override List<User> getAllByAddedWidget(String widgetId); @Override User getByForgotPasswordHash(String hash); @Override Class<? extends User> getType(); @Override User get(String id); @Override User save(User item); @Override void delete(User item);  }### Answer:
@Test public void getSearchResult() { String searchTerm = "Doe"; final int offset = 0; final int pageSize = 10; List<User> users = repository.findByUsernameOrEmail(searchTerm, offset, pageSize); assertNotNull(users); assertTrue(users.size() > 0 && users.size() <= pageSize); }