imageUploadController.WRONG_FORMAT_RESOURCE_MESSAGE,
new Object[]{validTypes},
locale)
).thenReturn(expectedMessage);
FailJsonResponse result = imageUploadController.handleImageFormatException(new ImageFormatException(validTypes), locale);
assertEquals(result.getStatus(), JsonResponseStatus.FAIL, "We have an exception, so we should get false value.");
assertEquals(result.getReason(), JsonResponseReason.VALIDATION, "Failture reason should be validation");
assertEquals(result.getResult(), expectedMessage, "Result contains incorrect message.");
}