VisualRecognition extends BaseService { public ServiceCall<Classifier> getClassifier(GetClassifierOptions getClassifierOptions) { com.ibm.cloud.sdk.core.util.Validator.notNull( getClassifierOptions, "getClassifierOptions cannot be null"); String[] pathSegments = {"v3/classifiers"}; String[] pathParameters = {getClassifierOptions.classifierId()}; RequestBuilder builder = RequestBuilder.get( RequestBuilder.constructHttpUrl(getServiceUrl(), pathSegments, pathParameters)); builder.query("version", versionDate); Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("watson_vision_combined", "v3", "getClassifier"); for (Entry<String, String> header : sdkHeaders.entrySet()) { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); ResponseConverter<Classifier> responseConverter = ResponseConverterUtils.getValue( new com.google.gson.reflect.TypeToken<Classifier>() {}.getType()); return createServiceCall(builder.build(), responseConverter); } VisualRecognition(String versionDate);  VisualRecognition(String versionDate, Authenticator authenticator);  VisualRecognition(String versionDate, String serviceName);  VisualRecognition(String versionDate, String serviceName, Authenticator authenticator); ServiceCall<ClassifiedImages> classify(ClassifyOptions classifyOptions); ServiceCall<ClassifiedImages> classify(); ServiceCall<Classifier> createClassifier(CreateClassifierOptions createClassifierOptions); ServiceCall<Classifiers> listClassifiers(ListClassifiersOptions listClassifiersOptions); ServiceCall<Classifiers> listClassifiers(); ServiceCall<Classifier> getClassifier(GetClassifierOptions getClassifierOptions); ServiceCall<Classifier> updateClassifier(UpdateClassifierOptions updateClassifierOptions); ServiceCall<Void> deleteClassifier(DeleteClassifierOptions deleteClassifierOptions); ServiceCall<InputStream> getCoreMlModel(GetCoreMlModelOptions getCoreMlModelOptions); ServiceCall<Void> deleteUserData(DeleteUserDataOptions deleteUserDataOptions);  }
@Test public void testGetClassifier() throws InterruptedException, IOException { try { Classifier mockResponse = loadFixture(FIXTURE_CLASSIFIER, Classifier.class); server.enqueue(new MockResponse().setBody(mockResponse.toString())); String class1 = "class1"; GetClassifierOptions getOptions = new GetClassifierOptions.Builder(class1).build(); Classifier serviceResponse = service.getClassifier(getOptions).execute().getResult(); RecordedRequest request = server.takeRequest(); String path = String.format(PATH_CLASSIFIER + "?" + VERSION_KEY + "=" + VERSION, class1); assertEquals(path, request.getPath()); assertEquals("GET", request.getMethod()); assertEquals(serviceResponse, mockResponse); } catch (Exception e) { e.printStackTrace(); } }