private ServletRequest prepareServletRequest(Object target, NativeWebRequest request, MethodParameter parameter) {
String modelPrefixName = parameter.getParameterAnnotation(FormModel.class).value();
HttpServletRequest nativeRequest = (HttpServletRequest) request.getNativeRequest();
MultipartRequest multipartRequest = WebUtils.getNativeRequest(nativeRequest, MultipartRequest.class);
MockHttpServletRequest mockRequest = null;
if (multipartRequest != null) {
MockMultipartHttpServletRequest mockMultipartRequest = new MockMultipartHttpServletRequest();
for(MultipartFile file : multipartRequest.getFileMap().values()) {
mockMultipartRequest.addFile(new MultipartFileWrapper(getNewParameterName(file.getName(), modelPrefixName), file));
}
mockRequest = mockMultipartRequest;
} else {
mockRequest = new MockHttpServletRequest();