@Test(expected = IllegalStateException.class)
public void testCreateProcessorWhenExtensionManagerDoesNotExist() {

    final String flowId = "1";
    final String processGroupId = "child-level-2";
    when(flowManager.getFlow(flowId)).thenReturn(Optional.of(flow));
    when(extensionManagers.getExtensionManager(flow.getFlowMetadata().getAgentClass()))
            .thenReturn(Optional.empty());
    processorService.create(flowId, processGroupId, new VersionedProcessor());
}