@Test
public void testCreateConnectionFromOutputPortInChildGroup() {

    final String flowId = flow.getFlowMetadata().getIdentifier();
    final String groupId = group2.getIdentifier();
    when(flowManager.getFlow(flowId)).thenReturn(Optional.of(flow));
    // Make the source the output port of group 3 which is in the same group as the destination
    final ConnectableComponent newSource = ComponentUtils.createConnectableComponent(group3OutputPort);
    connectionConfig.setSource(newSource);
    connectionService.create(flowId, groupId, connectionConfig);
}