@Test
  public void testAllowedClient() throws IOException {
    HttpURLConnection conn = openConnection("/echo?a=b", BJONES_CREDENTIALS);
    assertEquals(HttpURLConnection.HTTP_OK, conn.getResponseCode());
  }
Test class for LDAP authentication on the HttpServer.
hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestLdapHttpServer.java