### Question:
TopicSearchController { @RequestMapping(value = "/search/index/rebuild") @ResponseStatus(value = HttpStatus.NO_CONTENT) public void rebuildIndexes() { topicSearchService.rebuildSearchIndex(); } @Autowired  TopicSearchController(TopicFetchService topicSearchService,
                                 LastReadPostService lastReadPostService,
                                 EntityToDtoConverter converter); @RequestMapping(value = "/search/index/rebuild") @ResponseStatus(value = HttpStatus.NO_CONTENT) void rebuildIndexes(); @RequestMapping(value = "/search", method = RequestMethod.GET) ModelAndView initSearch(@RequestParam(value = "text", defaultValue = "", required = false) String searchText,
                                   @RequestParam(value = "page", defaultValue = "1", required = false) String page); static final String URI_ATTRIBUTE_NAME; static final String SEARCH_RESULT_ATTRIBUTE_NAME; static final String SEARCH_TEXT_ATTRIBUTE_NAME; }### Answer:
@Test public void testRebuildIndexes() { topicSearchController.rebuildIndexes(); verify(topicFetchService).rebuildSearchIndex(); }