title: How to create a mock object of org.springframework.http.codec.multipart.FilePart for Junit
body: <p>I am trying to write unit test case for a function which takes a parameter of type &quot;<code>org.springframework.http.codec.multipart.FilePart</code>&quot; as an input.</p>
  <p>However I am not able to figure out how to create a mock object of the class implementing above interface.</p>
  <p>Browsing through some documentation, I found about <code>MockMultipartFile</code>, however I am not able to figure out if the above object can be used to construct an instance of <code>org.springframework.http.codec.multipart.FilePart</code> type.</p>
  <pre><code>private boolean isValidFile(FilePart filePart){
    boolean valid = true;
    // Do Something
    return valid;
  }
  </code></pre>
  <p>Can someone help me out please ?</p>