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

    when(flowManager.getFlow(flow.getFlowMetadata().getIdentifier())).thenReturn(Optional.of(flow));
    group2Processor1.setGroupIdentifier("does-not-exist");
    processorService.delete(flow.getFlowMetadata().getIdentifier(), group2Processor1.getIdentifier());
}