title: Integration test case and file upload
body: <p>I wrote some code for related to upload a file using spring, It works fine, Now I am writing integration test cases for that but I am facing some issue
          My controller  method,</p>
  
  <pre><code>@RequestMapping(value = "/{attributeName}/upload", method = RequestMethod.POST)
  @ResponseBody
  public Result uploadCompany(HttpServletRequest request,
          @RequestParam MultipartFile file, @PathVariable String attributeName,
          @RequestParam long dateKey)
          throws IOException, PromotionException {
      some code
  }
  </code></pre>
  
  <p>Test cases</p>
  
  <pre><code>@Test
  public void shouldReturnTrueStatusWhenUploadCompany() throws Exception {
      MockMultipartFile file = new MockMultipartFile("company_upload", "company_upload.csv",
              MediaType.MULTIPART_FORM_DATA_VALUE, EMPLOYEE_NUMBER_FILE_CONTENT.getBytes(UTF_8));
      mockMvc.perform(
              MockMvcRequestBuilders.fileUpload(
                      PROMOTION + StringUtils.replace(ATTRIBUTE_NAME, "{attributeName}", "COMPANY") + "/upload")
                      .file(file).param("dateKey", "852017")  .contentType(MediaType.MULTIPART_FORM_DATA)
                      .accept(MediaType.APPLICATION_JSON))
              .andExpect(status().isOk());
  
  }
  </code></pre>
  
  <p>But I am getting  </p>
  
  <pre><code>2017-05-09 13:42:42,506 ERROR [Test worker] INTERNAL_SERVER_ERROR: 
  org.springframework.web.bind.MissingServletRequestParameterException: Required MultipartFile parameter 'file' is not present
  </code></pre>
  
  <p>Where am I wrong?</p>