@Test public void testReindexShouldRunReindex() throws IOException { underTest.reindex(response); verify(indexTaskScheduler).runReindexOnDemand(); }
@RequestMapping(value = "/reindex", method = RequestMethod.GET) public void reindex(final HttpServletResponse response) { indexTaskScheduler.runReindexOnDemand(); PrintWriter writer; try { writer = response.getWriter(); writer.write("Reindexing!"); writer.flush(); } catch (IOException e) { logger.info("error occurred when accessing /reindex", e); } }
ReindexController { @RequestMapping(value = "/reindex", method = RequestMethod.GET) public void reindex(final HttpServletResponse response) { indexTaskScheduler.runReindexOnDemand(); PrintWriter writer; try { writer = response.getWriter(); writer.write("Reindexing!"); writer.flush(); } catch (IOException e) { logger.info("error occurred when accessing /reindex", e); } } }
ReindexController { @RequestMapping(value = "/reindex", method = RequestMethod.GET) public void reindex(final HttpServletResponse response) { indexTaskScheduler.runReindexOnDemand(); PrintWriter writer; try { writer = response.getWriter(); writer.write("Reindexing!"); writer.flush(); } catch (IOException e) { logger.info("error occurred when accessing /reindex", e); } }  }
ReindexController { @RequestMapping(value = "/reindex", method = RequestMethod.GET) public void reindex(final HttpServletResponse response) { indexTaskScheduler.runReindexOnDemand(); PrintWriter writer; try { writer = response.getWriter(); writer.write("Reindexing!"); writer.flush(); } catch (IOException e) { logger.info("error occurred when accessing /reindex", e); } }  @RequestMapping(value = "/reindex", method = RequestMethod.GET) void reindex(final HttpServletResponse response); }
ReindexController { @RequestMapping(value = "/reindex", method = RequestMethod.GET) public void reindex(final HttpServletResponse response) { indexTaskScheduler.runReindexOnDemand(); PrintWriter writer; try { writer = response.getWriter(); writer.write("Reindexing!"); writer.flush(); } catch (IOException e) { logger.info("error occurred when accessing /reindex", e); } }  @RequestMapping(value = "/reindex", method = RequestMethod.GET) void reindex(final HttpServletResponse response);  }