ManageAudienceBlobClientImpl implements ManageAudienceBlobClient { @Override public CompletableFuture<BotApiResponse> addUserIdsToAudience(long audienceGroupId, String uploadDescription, File file) { MultipartBody parts = new Builder() .addFormDataPart("audienceGroupId", String.valueOf(audienceGroupId)) .addFormDataPart("uploadDescription", uploadDescription) .addFormDataPart("file", file.getName(), RequestBody.create(MediaType.get("text/plain"), file)) .build(); return LineMessagingClientImpl.toBotApiFuture(retrofitImpl.addUserIdsToAudience( 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 addUserIdsToAudience() throws Exception { File tmpFile = Files.newTemporaryFile(); tmpFile.deleteOnExit(); when(retrofitMock.addUserIdsToAudience(any())).thenReturn(new VoidCall()); final BotApiResponse actual = target.addUserIdsToAudience( 5963L, "UPLOAD!", tmpFile ).get(); verify(retrofitMock, only()).addUserIdsToAudience(any()); assertThat(actual).isEqualTo(new BotApiResponse(null, "", Arrays.asList())); }