### Question:
SwaggerRedirectResource { @GetMapping("/") public void swaggerUI(HttpServletResponse response) throws IOException { response.sendRedirect("/swagger-ui.html"); }  @GetMapping("/") void swaggerUI(HttpServletResponse response);  }### Answer:
@Test void swaggerUI() throws IOException { SwaggerRedirectResource swaggerRedirectResource = new SwaggerRedirectResource(); MockHttpServletResponse response = new MockHttpServletResponse(); swaggerRedirectResource.swaggerUI(response); assertEquals("/swagger-ui.html", response.getRedirectedUrl()); }