### Question:
AdministrationImagesController extends ImageUploadController { @RequestMapping(value = "/admin/icon/IFrameFavIconPreview", method = RequestMethod.POST) @ResponseBody public ResponseEntity<String> uploadFavIcon( @RequestParam(value = "qqfile") MultipartFile file) throws IOException, ImageProcessException { return createPreviewOfImage(file, favIconPngControllerUtils); } @Autowired  AdministrationImagesController(ComponentService componentService,
                                          @Qualifier("forumLogoControllerUtils")
                                          ImageControllerUtils logoControllerUtils,
                                          @Qualifier("favIconPngControllerUtils")
                                          ImageControllerUtils favIconPngControllerUtils,
                                          @Qualifier("favIconIcoControllerUtils")
                                          ImageControllerUtils favIconIcoControllerUtils,
                                          MessageSource messageSource); @RequestMapping(value = "/admin/logo", method = RequestMethod.GET) void getForumLogo(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = "/admin/defaultLogo", method = RequestMethod.GET) @ResponseBody String getDefaultLogoInJson(); @RequestMapping(value = "/admin/logo/IFrameLogoPreview", method = RequestMethod.POST) @ResponseBody ResponseEntity<String> uploadLogo(
            @RequestParam(value = "qqfile") MultipartFile file); @RequestMapping(value = "/admin/logo/XHRlogoPreview", method = RequestMethod.POST) @ResponseBody Map<String, String> uploadLogo(@RequestBody byte[] bytes,
                                          HttpServletResponse response); @RequestMapping(value = "/admin/icon/ico", method = RequestMethod.GET) void getFavIconICO(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = "/admin/icon/png", method = RequestMethod.GET) void getFavIconPNG(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = "/admin/defaultIcon", method = RequestMethod.GET) @ResponseBody String getDefaultIconInJson(); @RequestMapping(value = "/admin/icon/IFrameFavIconPreview", method = RequestMethod.POST) @ResponseBody ResponseEntity<String> uploadFavIcon(
            @RequestParam(value = "qqfile") MultipartFile file); @RequestMapping(value = "/admin/icon/XHRFavIconPreview", method = RequestMethod.POST) @ResponseBody Map<String, String> uploadFavIcon(@RequestBody byte[] bytes,
                                             HttpServletResponse response);  }### Answer:
@Test public void uploadIconForOperaAndIEShouldReturnPreviewInResponce() throws IOException, ImageProcessException { MultipartFile file = new MockMultipartFile("qqfile", validImage); administrationController.uploadFavIcon(file); verify(favIconPngControllerUtils).prepareResponse(eq(file), any(HttpHeaders.class), any(HashMap.class)); }
@Test public void uploadIconForChromeAndFFShouldReturnPreviewInResponce() throws ImageProcessException { MockHttpServletResponse response = new MockHttpServletResponse(); administrationController.uploadFavIcon(validImage, response); verify(favIconPngControllerUtils).prepareResponse(eq(validImage), eq(response), any(HashMap.class)); }