@Test
  public void testCreateThriftTwoSource() {
    // Make sure that the factory gives back a singleton.
    assertSame(new MetricsThriftServerSourceFactoryImpl().createThriftTwoSource(),
      new MetricsThriftServerSourceFactoryImpl().createThriftTwoSource());
  }
Test for hadoop 2's version of MetricsThriftServerSourceFactory.
hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactoryImpl.java