@Test
public void testDeleteProcessorWithNoConnections() {

    when(flowManager.getFlow(flow.getFlowMetadata().getIdentifier())).thenReturn(Optional.of(flow));
    assertEquals(3, group2.getProcessors().size());
    assertEquals(1, group2.getConnections().size());
    processorService.delete(
            flow.getFlowMetadata().getIdentifier(),
            group2Processor1.getIdentifier());
    // Verify one processor was removed and the connection was removed
    assertEquals(2, group2.getProcessors().size());
    assertEquals(1, group2.getConnections().size());
}