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

    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.of(extensionManager));
    final VersionedProcessor requestProcessor = createVersionedProcessor();
    when(extensionManager.createProcessor(
            requestProcessor.getType(),
            requestProcessor.getBundle()))
            .thenThrow(new IllegalArgumentException("Bundle does not exist"));
    processorService.create(flowId, processGroupId, requestProcessor);
}