@Test
public void testDeleteControllerServiceSuccess() {

    when(flowManager.getFlow(flow.getFlowMetadata().getIdentifier())).thenReturn(Optional.of(flow));
    when(extensionManagers.getExtensionManager(flow.getFlowMetadata().getAgentClass())).thenReturn(Optional.of(extensionManager));
    assertEquals(1, group2.getControllerServices().size());
    controllerServiceService.delete(
            flow.getFlowMetadata().getIdentifier(),
            existingService.getIdentifier());
    assertEquals(0, group2.getControllerServices().size());
}