@Test public void testDisableControllerService() { final ProcessGroup procGroup = new MockProcessGroup(); final FlowController controller = Mockito.mock(FlowController.class); Mockito.when(controller.getGroup(Mockito.anyString())).thenReturn(procGroup); final ProcessScheduler scheduler = createScheduler(); final StandardControllerServiceProvider provider = new StandardControllerServiceProvider(controller, scheduler, null, stateManagerProvider, variableRegistry, NiFiProperties.createBasicNiFiProperties(null, null)); final ControllerServiceNode serviceNode = provider.createControllerService(ServiceB.class.getName(), "B", false); provider.enableControllerService(serviceNode); provider.disableControllerService(serviceNode); }
@Override public void disableControllerService(final ControllerServiceNode serviceNode) { serviceNode.verifyCanDisable(); processScheduler.disableControllerService(serviceNode); }
StandardControllerServiceProvider implements ControllerServiceProvider { @Override public void disableControllerService(final ControllerServiceNode serviceNode) { serviceNode.verifyCanDisable(); processScheduler.disableControllerService(serviceNode); } }
StandardControllerServiceProvider implements ControllerServiceProvider { @Override public void disableControllerService(final ControllerServiceNode serviceNode) { serviceNode.verifyCanDisable(); processScheduler.disableControllerService(serviceNode); } StandardControllerServiceProvider(final FlowController flowController, final ProcessScheduler scheduler, final BulletinRepository bulletinRepo,
            final StateManagerProvider stateManagerProvider, final VariableRegistry variableRegistry, final NiFiProperties nifiProperties); }
StandardControllerServiceProvider implements ControllerServiceProvider { @Override public void disableControllerService(final ControllerServiceNode serviceNode) { serviceNode.verifyCanDisable(); processScheduler.disableControllerService(serviceNode); } StandardControllerServiceProvider(final FlowController flowController, final ProcessScheduler scheduler, final BulletinRepository bulletinRepo,
            final StateManagerProvider stateManagerProvider, final VariableRegistry variableRegistry, final NiFiProperties nifiProperties); @Override ControllerServiceNode createControllerService(final String type, final String id, final boolean firstTimeAdded); @Override Set<ConfiguredComponent> disableReferencingServices(final ControllerServiceNode serviceNode); @Override Set<ConfiguredComponent> scheduleReferencingComponents(final ControllerServiceNode serviceNode); @Override Set<ConfiguredComponent> unscheduleReferencingComponents(final ControllerServiceNode serviceNode); @Override void enableControllerService(final ControllerServiceNode serviceNode); @Override void enableControllerServices(final Collection<ControllerServiceNode> serviceNodes); @Override void disableControllerService(final ControllerServiceNode serviceNode); @Override ControllerService getControllerService(final String serviceIdentifier); @Override ControllerService getControllerServiceForComponent(final String serviceIdentifier, final String componentId); @Override boolean isControllerServiceEnabled(final ControllerService service); @Override boolean isControllerServiceEnabled(final String serviceIdentifier); @Override boolean isControllerServiceEnabling(final String serviceIdentifier); @Override ControllerServiceNode getControllerServiceNode(final String serviceIdentifier); @Override Set<String> getControllerServiceIdentifiers(final Class<? extends ControllerService> serviceType, final String groupId); @Override String getControllerServiceName(final String serviceIdentifier); @Override void removeControllerService(final ControllerServiceNode serviceNode); @Override Set<ControllerServiceNode> getAllControllerServices(); @Override Set<ConfiguredComponent> enableReferencingServices(final ControllerServiceNode serviceNode); @Override void verifyCanEnableReferencingServices(final ControllerServiceNode serviceNode); @Override void verifyCanScheduleReferencingComponents(final ControllerServiceNode serviceNode); @Override void verifyCanDisableReferencingServices(final ControllerServiceNode serviceNode); @Override void verifyCanStopReferencingComponents(final ControllerServiceNode serviceNode); @Override Set<String> getControllerServiceIdentifiers(final Class<? extends ControllerService> serviceType); }
StandardControllerServiceProvider implements ControllerServiceProvider { @Override public void disableControllerService(final ControllerServiceNode serviceNode) { serviceNode.verifyCanDisable(); processScheduler.disableControllerService(serviceNode); } StandardControllerServiceProvider(final FlowController flowController, final ProcessScheduler scheduler, final BulletinRepository bulletinRepo,
            final StateManagerProvider stateManagerProvider, final VariableRegistry variableRegistry, final NiFiProperties nifiProperties); @Override ControllerServiceNode createControllerService(final String type, final String id, final boolean firstTimeAdded); @Override Set<ConfiguredComponent> disableReferencingServices(final ControllerServiceNode serviceNode); @Override Set<ConfiguredComponent> scheduleReferencingComponents(final ControllerServiceNode serviceNode); @Override Set<ConfiguredComponent> unscheduleReferencingComponents(final ControllerServiceNode serviceNode); @Override void enableControllerService(final ControllerServiceNode serviceNode); @Override void enableControllerServices(final Collection<ControllerServiceNode> serviceNodes); @Override void disableControllerService(final ControllerServiceNode serviceNode); @Override ControllerService getControllerService(final String serviceIdentifier); @Override ControllerService getControllerServiceForComponent(final String serviceIdentifier, final String componentId); @Override boolean isControllerServiceEnabled(final ControllerService service); @Override boolean isControllerServiceEnabled(final String serviceIdentifier); @Override boolean isControllerServiceEnabling(final String serviceIdentifier); @Override ControllerServiceNode getControllerServiceNode(final String serviceIdentifier); @Override Set<String> getControllerServiceIdentifiers(final Class<? extends ControllerService> serviceType, final String groupId); @Override String getControllerServiceName(final String serviceIdentifier); @Override void removeControllerService(final ControllerServiceNode serviceNode); @Override Set<ControllerServiceNode> getAllControllerServices(); @Override Set<ConfiguredComponent> enableReferencingServices(final ControllerServiceNode serviceNode); @Override void verifyCanEnableReferencingServices(final ControllerServiceNode serviceNode); @Override void verifyCanScheduleReferencingComponents(final ControllerServiceNode serviceNode); @Override void verifyCanDisableReferencingServices(final ControllerServiceNode serviceNode); @Override void verifyCanStopReferencingComponents(final ControllerServiceNode serviceNode); @Override Set<String> getControllerServiceIdentifiers(final Class<? extends ControllerService> serviceType);  }