@Test
  public void testAppendsObserver() {
    conf.set(MASTER_COPROCESSOR_CONF_KEY, AccessController.class.getName());
    master.updateConfigurationForQuotasObserver(conf);
    Set<String> coprocs = new HashSet<>(conf.getStringCollection(MASTER_COPROCESSOR_CONF_KEY));
    assertEquals(2, coprocs.size());
    assertTrue("Observed coprocessors were: " + coprocs,
      coprocs.contains(AccessController.class.getName()));
    assertTrue("Observed coprocessors were: " + coprocs,
      coprocs.contains(MasterQuotasObserver.class.getName()));
  }
Test class for MasterQuotasObserver that does not require a cluster.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestMasterQuotasObserverWithMocks.java