title: How to write /upload file test with mockito?
body: <p>I'm trying to /upload test. It is my method:</p>
  
  <pre><code>@PostMapping("/upload")
      public FileClass upload(MultipartFile file,
                                 Long id,
                                 @RequestParam(required = false, defaultValue = "false") Boolean isFile
      ) {
          return getService().upload(file, id, isFile);
      }
  </code></pre>
  
  <p>and my test class below:</p>
  
  <pre><code>@Test
      public void upload() throws Exception {
  
          MockMultipartFile mockMultipartFile =
                  new MockMultipartFile("test", "test.txt", "multipart/form-data", "test".getBytes());
  
                  getMockMvc().perform(multipart("/upload")
                          .file(mockMultipartFile)
                          .param("isFile","false")
                          .header("authorization", getToken()))
                  .andExpect(status().isOk());
  
      }
  </code></pre>
  
  <p>This test return 404 error:
  <strong><em>java.lang.AssertionError: Status expected:&lt;200> but was:&lt;404></em></strong>
  What is my fault? </p>