title: Play 2.4: How to write a test case for file upload with MultipartFormData
body: <p>So far (up to Play 2.3) to create a mock request I used <code>Helpers.fakeRequest().withAnyContent()</code>. E.g.</p>
  
  <pre><code>private Request getMultiPartFormDataRequestForFileUpload(File file,
          String filePartKey, String contentType) {
      FilePart&lt;TemporaryFile&gt; part = new MultipartFormData.FilePart&lt;&gt;(
              filePartKey, file.getName(), Scala.Option(contentType),
              new TemporaryFile(file));
      List&lt;FilePart&lt;TemporaryFile&gt;&gt; fileParts = new ArrayList&lt;&gt;();
      fileParts.add(part);
      scala.collection.immutable.List&lt;FilePart&lt;TemporaryFile&gt;&gt; files = scala.collection.JavaConversions
              .asScalaBuffer(fileParts).toList();
      MultipartFormData&lt;TemporaryFile&gt; formData = new MultipartFormData&lt;TemporaryFile&gt;(
              null, files, null, null);
      return Helpers.fakeRequest().withAnyContent(formData);
  }
  </code></pre>
  
  <p>In Play 2.4 this isn't possible any more. If I look at the source of <a href="https://www.playframework.com/documentation/2.4.3/api/java/play/mvc/Http.RequestBuilder.html" rel="nofollow">RequestBuilder</a> (which is implemented by FakeRequest) a similar function exist, but it's protected and I can't use it.</p>
  
  <pre><code>protected Http.RequestBuilder   body(play.api.mvc.AnyContent anyContent)
  Set a AnyContent to this request.
  </code></pre>
  
  <p>Does anyone know how I can write a test case to check a file upload with MultipartFormData in 2.4?</p>