@Test(expected = ResourceNotFoundException.class)
public void testCreateProcessorWhenProcessGroupDoesNotExist() {

    final String flowId = "1";
    final String processGroupId = "DOES-NOT-EXIST";
    when(flowManager.getFlow(flowId)).thenReturn(Optional.of(flow));
    processorService.create(flowId, processGroupId, new VersionedProcessor());
}