IndexSearchRestController extends HerdBaseController { @RequestMapping(value = "/indexSearch", method = POST, consumes = {"application/xml", "application/json"}) @Secured(FN_INDEX_SEARCH_POST) public IndexSearchResponse indexSearch(@RequestParam(value = "fields", required = false, defaultValue = "") Set<String> fields, @RequestParam(value = "match", required = false, defaultValue = "") Set<String> match, @RequestBody IndexSearchRequest request) { return indexSearchService.indexSearch(request, fields, match); }  @RequestMapping(value = "/indexSearch", method = POST, consumes = {"application/xml", "application/json"}) @Secured(FN_INDEX_SEARCH_POST) IndexSearchResponse indexSearch(@RequestParam(value = "fields", required = false, defaultValue = "") Set<String> fields,
        @RequestParam(value = "match", required = false, defaultValue = "") Set<String> match, @RequestBody IndexSearchRequest request);  }
@Test public void testIndexSearch() { final IndexSearchRequest indexSearchRequest = new IndexSearchRequest(SEARCH_TERM, NO_INDEX_SEARCH_FILTERS, NO_INDEX_SEARCH_FACET_FIELDS, NO_ENABLE_HIT_HIGHLIGHTING); IndexSearchResponse indexSearchResponse = new IndexSearchResponse(LONG_VALUE, new ArrayList<>(), new ArrayList<>()); Set<String> fields = Sets.newHashSet(FIELD_SHORT_DESCRIPTION); Set<String> match = Sets.newHashSet(MATCH_COLUMN); when(indexSearchService.indexSearch(indexSearchRequest, fields, match)).thenReturn(indexSearchResponse); IndexSearchResponse result = indexSearchRestController.indexSearch(fields, match, indexSearchRequest); verify(indexSearchService).indexSearch(indexSearchRequest, fields, match); verifyNoMoreInteractions(indexSearchService); assertEquals(indexSearchResponse, result); }