File file = new File("d:/test.txt");
FileInputStream input = new FileInputStream(file);
MultipartFile multipartFile = new org.springframework.mock.web.MockMultipartFile("file", file.getName(), "text/plain", org.apache.commons.io.IOUtils.toByteArray(input));