public static HttpServer createTestServerWithSecurity(Configuration conf) throws IOException {
    prepareTestWebapp();
    return localServerBuilder(TEST).setFindPort(true).setConf(conf).setSecurityEnabled(true)
      // InfoServer normally sets these for us
      .setUsernameConfKey(HttpServer.HTTP_SPNEGO_AUTHENTICATION_PRINCIPAL_KEY)
      .setKeytabConfKey(HttpServer.HTTP_SPNEGO_AUTHENTICATION_KEYTAB_KEY).build();
  }
Create but do not start the test webapp server. The test webapp dir is prepared/checked in
advance.
@param conf the server configuration to use
@return the server instance
@throws IOException    if a problem occurs
@throws AssertionError if a condition was not met
hbase-http/src/test/java/org/apache/hadoop/hbase/http/HttpServerFunctionalTest.java