@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(); }
if (master.cpHost != null && hasAccessControlServiceCoprocessor(master.cpHost)) { if (AccessChecker.isAuthorizationSupported(master.getConfiguration())) { capabilities.add(SecurityCapabilitiesResponse.Capability.AUTHORIZATION);
@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(); }