### Question:
ImageControllerUtils { public void prepareNormalResponse(byte[] bytes, Map<String, String> responseContent) throws ImageProcessException { String srcImage = imageService.preProcessAndEncodeInString64(bytes); responseContent.put(STATUS, String.valueOf(JsonResponseStatus.SUCCESS)); responseContent.put(SRC_PREFIX, imageService.getHtmlSrcImagePrefix()); responseContent.put(SRC_IMAGE, srcImage); } ImageControllerUtils(ImageService imageService, JSONUtils jsonUtils); ResponseEntity<String> prepareResponse(
            MultipartFile file,
            HttpHeaders responseHeaders,
            Map<String, String> responseContent); String getResponceJSONString(Map<String, String> responseContent); void prepareResponse(byte[] bytes,
                                HttpServletResponse response,
                                Map<String, String> responseContent); void prepareNormalResponse(byte[] bytes, Map<String, String> responseContent); String convertImageToIcoInString64(byte[] imageBytes); byte[] getDefaultImage(); ImageService getImageService(); static final String STATUS; static final String SRC_PREFIX; static final String SRC_IMAGE; }### Answer:
@Test public void validImageShouldGenerateValidNormalResponse() throws ImageProcessException { when(imageService.preProcessAndEncodeInString64(validAvatar)).thenReturn(IMAGE_BYTE_ARRAY_IN_BASE_64_STRING); when(imageService.getHtmlSrcImagePrefix()).thenReturn("jpeg"); Map<String, String> responseContent = new HashMap<String, String>(); imageControllerUtils.prepareNormalResponse(validAvatar, responseContent); assertEquals(responseContent.get(imageControllerUtils.STATUS), "SUCCESS"); assertEquals(responseContent.get(imageControllerUtils.SRC_PREFIX), "jpeg"); assertEquals(responseContent.get(imageControllerUtils.SRC_IMAGE), IMAGE_BYTE_ARRAY_IN_BASE_64_STRING); }