CompareComply extends BaseService { public ServiceCall<HTMLReturn> convertToHtml(ConvertToHtmlOptions convertToHtmlOptions) { com.ibm.cloud.sdk.core.util.Validator.notNull( convertToHtmlOptions, "convertToHtmlOptions cannot be null"); String[] pathSegments = {"v1/html_conversion"}; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getServiceUrl(), pathSegments)); builder.query("version", versionDate); Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("compare-comply", "v1", "convertToHtml"); for (Entry<String, String> header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); if (convertToHtmlOptions.model() != null) { builder.query("model", convertToHtmlOptions.model()); } MultipartBody.Builder multipartBuilder = new MultipartBody.Builder(); multipartBuilder.setType(MultipartBody.FORM); okhttp3.RequestBody fileBody = RequestUtils.inputStreamBody( convertToHtmlOptions.file(), convertToHtmlOptions.fileContentType()); multipartBuilder.addFormDataPart("file", "filename", fileBody); builder.body(multipartBuilder.build()); ResponseConverter<HTMLReturn> responseConverter = ResponseConverterUtils.getValue( new com.google.gson.reflect.TypeToken<HTMLReturn>() {}.getType()); return createServiceCall(builder.build(), responseConverter); } CompareComply(String versionDate);  CompareComply(String versionDate, Authenticator authenticator);  CompareComply(String versionDate, String serviceName);  CompareComply(String versionDate, String serviceName, Authenticator authenticator); ServiceCall<HTMLReturn> convertToHtml(ConvertToHtmlOptions convertToHtmlOptions); ServiceCall<ClassifyReturn> classifyElements(
      ClassifyElementsOptions classifyElementsOptions); ServiceCall<TableReturn> extractTables(ExtractTablesOptions extractTablesOptions); ServiceCall<CompareReturn> compareDocuments(
      CompareDocumentsOptions compareDocumentsOptions); ServiceCall<FeedbackReturn> addFeedback(AddFeedbackOptions addFeedbackOptions); ServiceCall<FeedbackList> listFeedback(ListFeedbackOptions listFeedbackOptions); ServiceCall<FeedbackList> listFeedback(); ServiceCall<GetFeedback> getFeedback(GetFeedbackOptions getFeedbackOptions); ServiceCall<FeedbackDeleted> deleteFeedback(DeleteFeedbackOptions deleteFeedbackOptions); ServiceCall<BatchStatus> createBatch(CreateBatchOptions createBatchOptions); ServiceCall<Batches> listBatches(ListBatchesOptions listBatchesOptions); ServiceCall<Batches> listBatches(); ServiceCall<BatchStatus> getBatch(GetBatchOptions getBatchOptions); ServiceCall<BatchStatus> updateBatch(UpdateBatchOptions updateBatchOptions);  }
@Test public void testConvertToHtml() throws FileNotFoundException, InterruptedException { server.enqueue(jsonResponse(convertToHtmlResponse)); ConvertToHtmlOptions convertToHtmlOptions = new ConvertToHtmlOptions.Builder().file(SAMPLE_PDF).build(); HTMLReturn response = service.convertToHtml(convertToHtmlOptions).execute().getResult(); RecordedRequest request = server.takeRequest(); assertEquals(CONVERT_TO_HTML_PATH, request.getPath()); assertEquals(NUM_PAGES, response.getNumPages()); assertEquals(AUTHOR, response.getAuthor()); assertEquals(PUBLICATION_DATE, response.getPublicationDate()); assertEquals(TITLE, response.getTitle()); assertEquals(HTML, response.getHtml()); }