CrescentSearchRequestWrapper { public int getHitsForPage() { if(searchRequest.getPageSize() == null || "".equals(searchRequest.getPageSize())) { return DEFAULT_HITS_FOR_PAGE; } return Integer.parseInt(searchRequest.getPageSize()); } CrescentSearchRequestWrapper(SearchRequest searchRequest); String getKeyword(); String getCollectionName(); int getDefaultHitsPage(); int getPageNum(); int getStartOffSet(); int getHitsForPage(); Sort getSort(); Query getQuery(); Filter getFilter(); List<CrescentCollectionField> getTargetSearchFields(); List<CrescentCollectionField> getIndexedFields(); String getUserIp(); String getUserId(); String getPcId();  }
@Test public void getHitsForPage() { CrescentSearchRequestWrapper searchRequestWrapper = new CrescentSearchRequestWrapper(searchRequest); Assert.assertEquals(20, searchRequestWrapper.getHitsForPage()); searchRequest.setPageSize("30"); Assert.assertEquals(30, searchRequestWrapper.getHitsForPage()); }