private static ThriftMetrics getMetrics(Configuration conf) throws Exception {
    return new ThriftMetrics(conf, ThriftMetrics.ThriftServerType.ONE);
  }
Tests if the metrics for thrift handler work correctly
hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java