private static Hbase.Iface getHandlerForMetricsTest(ThriftMetrics metrics, Configuration conf)
    throws Exception {
    Hbase.Iface handler = new MySlowHBaseHandler(conf);
    return HbaseHandlerMetricsProxy.newInstance((ThriftHBaseServiceHandler) handler, metrics, conf);
  }
Tests if the metrics for thrift handler work correctly
hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java