Search in sources :

Example 1 with DummyProcessor

use of org.apache.nifi.controller.service.mock.DummyProcessor in project nifi by apache.

the class TestStandardControllerServiceProvider method createProcessor.

private ProcessorNode createProcessor(final StandardProcessScheduler scheduler, final ControllerServiceProvider serviceProvider) {
    final ReloadComponent reloadComponent = Mockito.mock(ReloadComponent.class);
    final LoggableComponent<Processor> dummyProcessor = new LoggableComponent<>(new DummyProcessor(), systemBundle.getBundleDetails().getCoordinate(), null);
    final ProcessorNode procNode = new StandardProcessorNode(dummyProcessor, UUID.randomUUID().toString(), new StandardValidationContextFactory(serviceProvider, null), scheduler, serviceProvider, niFiProperties, new StandardComponentVariableRegistry(VariableRegistry.EMPTY_REGISTRY), reloadComponent);
    final ProcessGroup group = new StandardProcessGroup(UUID.randomUUID().toString(), serviceProvider, scheduler, null, null, Mockito.mock(FlowController.class), new MutableVariableRegistry(variableRegistry));
    group.addProcessor(procNode);
    procNode.setProcessGroup(group);
    return procNode;
}
Also used : Processor(org.apache.nifi.processor.Processor) DummyProcessor(org.apache.nifi.controller.service.mock.DummyProcessor) StandardComponentVariableRegistry(org.apache.nifi.registry.variable.StandardComponentVariableRegistry) StandardProcessGroup(org.apache.nifi.groups.StandardProcessGroup) ReloadComponent(org.apache.nifi.controller.ReloadComponent) StandardValidationContextFactory(org.apache.nifi.processor.StandardValidationContextFactory) LoggableComponent(org.apache.nifi.controller.LoggableComponent) ProcessorNode(org.apache.nifi.controller.ProcessorNode) StandardProcessorNode(org.apache.nifi.controller.StandardProcessorNode) ProcessGroup(org.apache.nifi.groups.ProcessGroup) MockProcessGroup(org.apache.nifi.controller.service.mock.MockProcessGroup) StandardProcessGroup(org.apache.nifi.groups.StandardProcessGroup) MutableVariableRegistry(org.apache.nifi.registry.variable.MutableVariableRegistry) FlowController(org.apache.nifi.controller.FlowController) DummyProcessor(org.apache.nifi.controller.service.mock.DummyProcessor) StandardProcessorNode(org.apache.nifi.controller.StandardProcessorNode)

Aggregations

FlowController (org.apache.nifi.controller.FlowController)1 LoggableComponent (org.apache.nifi.controller.LoggableComponent)1 ProcessorNode (org.apache.nifi.controller.ProcessorNode)1 ReloadComponent (org.apache.nifi.controller.ReloadComponent)1 StandardProcessorNode (org.apache.nifi.controller.StandardProcessorNode)1 DummyProcessor (org.apache.nifi.controller.service.mock.DummyProcessor)1 MockProcessGroup (org.apache.nifi.controller.service.mock.MockProcessGroup)1 ProcessGroup (org.apache.nifi.groups.ProcessGroup)1 StandardProcessGroup (org.apache.nifi.groups.StandardProcessGroup)1 Processor (org.apache.nifi.processor.Processor)1 StandardValidationContextFactory (org.apache.nifi.processor.StandardValidationContextFactory)1 MutableVariableRegistry (org.apache.nifi.registry.variable.MutableVariableRegistry)1 StandardComponentVariableRegistry (org.apache.nifi.registry.variable.StandardComponentVariableRegistry)1