ManageAudienceBlobClientImpl implements ManageAudienceBlobClient { @Override public CompletableFuture<CreateAudienceForUploadingResponse> createAudienceForUploadingUserIds( String description, boolean isIfaAudience, String uploadDescription, File file) { MultipartBody parts = new MultipartBody.Builder() .addFormDataPart("description", description) .addFormDataPart("isIfaAudience", String.valueOf(isIfaAudience)) .addFormDataPart("uploadDescription", uploadDescription) .addFormDataPart("file", file.getName(), RequestBody.create(MediaType.get("text/plain"), file)) .build(); return toFuture(retrofitImpl.createAudienceForUploadingUserIds(parts)); } ManageAudienceBlobClientImpl(ManageAudienceBlobService retrofitImpl); @Override CompletableFuture<CreateAudienceForUploadingResponse> createAudienceForUploadingUserIds(
            String description, boolean isIfaAudience, String uploadDescription, File file); @Override CompletableFuture<BotApiResponse> addUserIdsToAudience(long audienceGroupId,
                                                                  String uploadDescription,
                                                                  File file);  }
@Test public void createAudienceForUploadingUserIds() throws Exception { File tmpFile = Files.newTemporaryFile(); tmpFile.deleteOnExit(); CreateAudienceForUploadingResponse response = CreateAudienceForUploadingResponse.builder() .build(); whenCall(retrofitMock.createAudienceForUploadingUserIds( any()), response); final CreateAudienceForUploadingResponse actual = target.createAudienceForUploadingUserIds( "Hello", false, "UPLOAD!", tmpFile ).get(); verify(retrofitMock, only()).createAudienceForUploadingUserIds(any()); assertThat(actual).isEqualTo(response); }