@Test
  public void testCompatabilityRegistered() {
    assertNotNull(
      CompatibilitySingletonFactory.getInstance(MetricsThriftServerSourceFactory.class));
    assertTrue(CompatibilitySingletonFactory.getInstance(
      MetricsThriftServerSourceFactory.class) instanceof MetricsThriftServerSourceFactoryImpl);
  }
Test for hadoop 2's version of MetricsThriftServerSourceFactory.
hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactoryImpl.java