public HttpBasicAuthInterceptorWithLogging openSessionWithTestInterceptor(
          Map<String, String> additionalHeaders, Map<String, String> cookieHeaders) throws Exception {
    TTransport transport;
    DefaultHttpClient hClient = new DefaultHttpClient();
    String httpUrl = getHttpUrl();
    HttpBasicAuthInterceptorWithLogging authInt =
      new HttpBasicAuthInterceptorWithLogging(USERNAME, PASSWORD, null, null,
      false, additionalHeaders, cookieHeaders);
    hClient.addRequestInterceptor(authInt);
    transport = new THttpClient(httpUrl, hClient);
    TCLIService.Client httpClient = getClient(transport);

    // Create a new open session request object
    TOpenSessionReq openReq = new TOpenSessionReq();
    httpClient.OpenSession(openReq).getSessionHandle();
    return authInt;
  }
Test additional http headers passed to request interceptor.
@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/service/cli/thrift/TestThriftHttpCLIServiceFeatures.java