private static TTransport getHttpTransport() throws Exception {
    DefaultHttpClient httpClient = new DefaultHttpClient();
    String httpUrl = getHttpUrl();
    httpClient.addRequestInterceptor(
        new HttpBasicAuthInterceptor(USERNAME, PASSWORD,
            null, null, false, null, null));
    return new THttpClient(httpUrl, httpClient);
  }
Configure a wrong service endpoint for the client transport,
and test for error.
@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/service/cli/thrift/TestThriftHttpCLIServiceFeatures.java