@SuppressWarnings("unchecked")
  @Before
  public void setup() {
    masterServices = mock(MasterRpcServices.class);
    when(masterServices.hasAccessControlServiceCoprocessor(any(MasterCoprocessorHost.class)))
      .thenCallRealMethod();
    when(masterServices.hasVisibilityLabelsServiceCoprocessor(any(MasterCoprocessorHost.class)))
      .thenCallRealMethod();
    when(masterServices.checkCoprocessorWithService(any(List.class), any(Class.class)))
      .thenCallRealMethod();
  }
Tests that the MasterRpcServices is correctly searching for implementations of the Coprocessor
Service and not just the "default" implementations of those services.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterCoprocessorServices.java