if (request.getAttribute("resolved") != null) {
throw new IllegalStateException("Already resolved");
}
request.setAttribute("resolved", Boolean.TRUE);
MultiValueMap<String, MultipartFile> files = new LinkedMultiValueMap<String, MultipartFile>();
files.set("someFile", new MockMultipartFile("someFile", "someContent".getBytes()));
Map<String, String[]> params = new HashMap<String, String[]>();
params.put("someParam", new String[] {"someParam"});
return new DefaultMultipartActionRequest(request, files, params, Collections.<String, String>emptyMap());
}