@Test(expected = IllegalArgumentException.class)
public void testUpdateProcessorInvalidSchedulingStrategy() {

    when(flowManager.getFlow(flow.getFlowMetadata().getIdentifier())).thenReturn(Optional.of(flow));
    when(extensionManagers.getExtensionManager(flow.getFlowMetadata().getAgentClass()))
            .thenReturn(Optional.of(extensionManager));
    when(extensionManager.getProcessorDefinition(group2Processor1.getType(), group2Processor1.getBundle()))
            .thenReturn(new ProcessorDefinition());
    final String updatedSchedulingStrategy = "INVALID";
    final VersionedProcessor requestProcessor = new VersionedProcessor();
    requestProcessor.setIdentifier(group2Processor1.getIdentifier());
    requestProcessor.setSchedulingStrategy(updatedSchedulingStrategy);
    processorService.update(flow.getFlowMetadata().getIdentifier(), requestProcessor);
}