SdkCommon { public static Map<String, String> getSdkHeaders( String serviceName, String serviceVersion, String operationId) { Map<String, String> headers = new HashMap<>(); String sdkAnalyticsHeaderValue = String.format( "service_name=%s;service_version=%s;operation_id=%s", serviceName, serviceVersion, operationId); headers.put(WatsonHttpHeaders.X_IBMCLOUD_SDK_ANALYTICS, sdkAnalyticsHeaderValue); headers.put(HttpHeaders.USER_AGENT, getUserAgent()); return headers; } private  SdkCommon(); static Map<String, String> getSdkHeaders(
      String serviceName, String serviceVersion, String operationId);  }
@Test public void testGetSdkHeaders() { String serviceName = "test_name"; String serviceVersion = "v1"; String operationId = "test_method"; Map<String, String> defaultHeaders = SdkCommon.getSdkHeaders(serviceName, serviceVersion, operationId); assertTrue(defaultHeaders.containsKey(WatsonHttpHeaders.X_IBMCLOUD_SDK_ANALYTICS)); String analyticsHeaderValue = defaultHeaders.get(WatsonHttpHeaders.X_IBMCLOUD_SDK_ANALYTICS); assertTrue(analyticsHeaderValue.contains(serviceName)); assertTrue(analyticsHeaderValue.contains(serviceVersion)); assertTrue(analyticsHeaderValue.contains(operationId)); assertTrue(defaultHeaders.containsKey(HttpHeaders.USER_AGENT)); assertTrue(defaultHeaders.get(HttpHeaders.USER_AGENT).startsWith("watson-apis-java-sdk/")); }