test_class.declarator: indexSearchRestController
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private IndexSearchRestController indexSearchRestController;
test_class.type: IndexSearchRestController
test_class.var_name: indexSearchRestController
test_class.declarator: indexSearchService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private IndexSearchService indexSearchService;
test_class.type: IndexSearchService
test_class.var_name: indexSearchService
test_class.file: herd-code/herd-rest/src/test/java/org/finra/herd/rest/IndexSearchRestControllerTest.java
test_class.identifier: IndexSearchRestControllerTest
test_class.superclass: extends AbstractRestTest
test_case.body: @Test
      public void testIndexSearch()
      {
          // Create an index search request.
          final IndexSearchRequest indexSearchRequest =
              new IndexSearchRequest(SEARCH_TERM, NO_INDEX_SEARCH_FILTERS, NO_INDEX_SEARCH_FACET_FIELDS, NO_ENABLE_HIT_HIGHLIGHTING);
  
          // Create an index search response.
          IndexSearchResponse indexSearchResponse = new IndexSearchResponse(LONG_VALUE, new ArrayList<>(), new ArrayList<>());
  
          // Create a set of search optional fields.
          Set<String> fields = Sets.newHashSet(FIELD_SHORT_DESCRIPTION);
  
          // Create a set of search match fields.
          Set<String> match = Sets.newHashSet(MATCH_COLUMN);
  
          // Mock the external calls.
          when(indexSearchService.indexSearch(indexSearchRequest, fields, match)).thenReturn(indexSearchResponse);
  
          // Call the method under test.
          IndexSearchResponse result = indexSearchRestController.indexSearch(fields, match, indexSearchRequest);
  
          // Verify the external calls.
          verify(indexSearchService).indexSearch(indexSearchRequest, fields, match);
          verifyNoMoreInteractions(indexSearchService);
  
          // Validate the result.
          assertEquals(indexSearchResponse, result);
      }
test_case.class_method_signature: IndexSearchRestControllerTest.testIndexSearch()
test_case.full_signature: @Test public void testIndexSearch()
test_case.identifier: testIndexSearch
test_case.invocations: newHashSet newHashSet thenReturn when indexSearch indexSearch indexSearch verify verifyNoMoreInteractions assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIndexSearch()
focal_class.declarator: indexSearchService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private IndexSearchService indexSearchService;
focal_class.type: IndexSearchService
focal_class.var_name: indexSearchService
focal_class.file: herd-code/herd-rest/src/main/java/org/finra/herd/rest/IndexSearchRestController.java
focal_class.identifier: IndexSearchRestController
focal_class.class_method_signature: IndexSearchRestController.indexSearch(@RequestParam(value = "fields", required = false, defaultValue = "") Set<String> fields,
          @RequestParam(value = "match", required = false, defaultValue = "") Set<String> match, @RequestBody IndexSearchRequest request)
focal_class.full_signature: @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)
focal_class.identifier: indexSearch
focal_class.modifiers: @RequestMapping(value = "/indexSearch", method = POST, consumes = {"application/xml", "application/json"}) @Secured(FN_INDEX_SEARCH_POST) public
focal_class.parameters: (@RequestParam(value = "fields", required = false, defaultValue = "") Set<String> fields,
          @RequestParam(value = "match", required = false, defaultValue = "") Set<String> match, @RequestBody IndexSearchRequest request)
focal_class.return: IndexSearchResponse
focal_class.signature: IndexSearchResponse indexSearch(@RequestParam(value = "fields", required = false, defaultValue = "") Set<String> fields,
          @RequestParam(value = "match", required = false, defaultValue = "") Set<String> match, @RequestBody IndexSearchRequest request)
focal_class.superclass: extends HerdBaseController
focal_method.body: @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);
      }
focal_method.class_method_signature: IndexSearchRestController.indexSearch(@RequestParam(value = "fields", required = false, defaultValue = "") Set<String> fields,
          @RequestParam(value = "match", required = false, defaultValue = "") Set<String> match, @RequestBody IndexSearchRequest request)
focal_method.full_signature: @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)
focal_method.identifier: indexSearch
focal_method.invocations: indexSearch
focal_method.modifiers: @RequestMapping(value = "/indexSearch", method = POST, consumes = {"application/xml", "application/json"}) @Secured(FN_INDEX_SEARCH_POST) public
focal_method.parameters: (@RequestParam(value = "fields", required = false, defaultValue = "") Set<String> fields,
          @RequestParam(value = "match", required = false, defaultValue = "") Set<String> match, @RequestBody IndexSearchRequest request)
focal_method.return: IndexSearchResponse
focal_method.signature: IndexSearchResponse indexSearch(@RequestParam(value = "fields", required = false, defaultValue = "") Set<String> fields,
          @RequestParam(value = "match", required = false, defaultValue = "") Set<String> match, @RequestBody IndexSearchRequest request)