ComparisonController { @SuppressWarnings("MethodWithTooManyParameters") @RequestMapping(value = RESULTS_PATH, method = RequestMethod.GET) public Documents<R> getResults( @RequestParam(STATE_MATCH_PARAM) final List<String> stateMatchIds, @RequestParam(value = STATE_DONT_MATCH_PARAM, required = false) final List<String> stateDontMatchIds, @RequestParam(value = TEXT_PARAM, required = false, defaultValue = "*") final String text, @RequestParam(value = FIELD_TEXT_PARAM, defaultValue = "") final String fieldText, @RequestParam(value = RESULTS_START_PARAM, required = false, defaultValue = "1") final int resultsStart, @RequestParam(MAX_RESULTS_PARAM) final int maxResults, @RequestParam(SUMMARY_PARAM) final String summary, @RequestParam(value = SORT_PARAM, required = false) final String sort, @RequestParam(value = HIGHLIGHT_PARAM, required = false, defaultValue = "true") final boolean highlight, @RequestParam(value = PROMOTIONS, defaultValue = "false") final boolean promotions ) throws E { return comparisonService.getResults( stateMatchIds, ListUtils.emptyIfNull(stateDontMatchIds), text, fieldText, resultsStart, maxResults, summary, sort, highlight ); } @Autowired  ComparisonController(final ComparisonService<R, E> comparisonService, final DocumentsService<?, ?, ?, Q, R, E> documentsService); @RequestMapping(value = COMPARE_PATH, method = RequestMethod.POST) ComparisonStateTokens getCompareStateTokens(@RequestBody final ComparisonRequest<Q> body); @SuppressWarnings("MethodWithTooManyParameters") @RequestMapping(value = RESULTS_PATH, method = RequestMethod.GET) Documents<R> getResults(
            @RequestParam(STATE_MATCH_PARAM) final List<String> stateMatchIds,
            @RequestParam(value = STATE_DONT_MATCH_PARAM, required = false) final List<String> stateDontMatchIds,
            @RequestParam(value = TEXT_PARAM, required = false, defaultValue = "*") final String text,
            @RequestParam(value = FIELD_TEXT_PARAM, defaultValue = "") final String fieldText,
            @RequestParam(value = RESULTS_START_PARAM, required = false, defaultValue = "1") final int resultsStart,
            @RequestParam(MAX_RESULTS_PARAM) final int maxResults,
            @RequestParam(SUMMARY_PARAM) final String summary,
            @RequestParam(value = SORT_PARAM, required = false) final String sort,
            @RequestParam(value = HIGHLIGHT_PARAM, required = false, defaultValue = "true") final boolean highlight,
            @RequestParam(value = PROMOTIONS, defaultValue = "false") final boolean promotions
    );  }
@Test public void getResults() throws AciErrorException { final List<String> stateMatchIds = Collections.singletonList(MOCK_STATE_TOKEN_1); final List<String> stateDontMatchIds = Collections.singletonList(MOCK_STATE_TOKEN_2); final String text = "*"; final String fieldText = "EXISTS{}:LATITUDE AND EXISTS{}:LONGITUDE"; final int start = 3; final int maxResults = 6; final String summary = "context"; final String sort = "relevance"; final boolean highlight = true; comparisonController.getResults(stateMatchIds, stateDontMatchIds, text, fieldText, start, maxResults, summary, sort, highlight, false); verify(comparisonService).getResults(eq(stateMatchIds), eq(stateDontMatchIds), eq(text), eq(fieldText), eq(start), eq(maxResults), eq(summary), eq(sort), eq(highlight)); }