@Test
  public void ensureCompatRegistered() {
    assertNotNull(CompatibilitySingletonFactory.getInstance(MetricsRESTSource.class));
    assertTrue(CompatibilitySingletonFactory
      .getInstance(MetricsRESTSource.class) instanceof MetricsRESTSourceImpl);
  }
Test for hadoop 2's version of {@link MetricsRESTSource}.
hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/rest/TestMetricsRESTSourceImpl.java