@Override
      public Void run() throws Exception {
        Pair<Integer, String> pair = getMetricsPage();
        if (HttpURLConnection.HTTP_NOT_FOUND == pair.getFirst()) {
          // Not on hadoop 2
          return null;
        }
        assertEquals(HttpURLConnection.HTTP_FORBIDDEN, pair.getFirst().intValue());
        return null;
      }
Helper method to shut down the cluster (if running)
hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestInfoServersACL.java