private MultipartContainer givenAndWhen(boolean hasMultipart, Multipart multipart)
     throws IOException, AuthFailureError {
   // Given
   DefaultHttpClient httpClient = new DefaultHttpClient();
   HttpStack stack = new MultipartHttpClientStack(httpClient);
   MultipartContainer mock = PartTestUtils.createMultipartContainerMock(hasMultipart, multipart);
   Request<?> request = new TestMultipartRequest(url, Method.POST, mock);
   // When
   stack.performRequest(request, EMPTY_MAP);
   return mock;
 }
 private MultipartContainer givenAndWhen(boolean hasMultipart)
     throws IOException, AuthFailureError {
   return givenAndWhen(hasMultipart, PartTestUtils.createSampleMultipart());
 }