@Test
public void testCreateConnectionSameGroup() {

    final String flowId = flow.getFlowMetadata().getIdentifier();
    final String groupId = group2.getIdentifier();
    when(flowManager.getFlow(flowId)).thenReturn(Optional.of(flow));
    final FDConnection createdConnection = connectionService.create(flowId, groupId, connectionConfig);
    assertNotNull(createdConnection);
    assertNotNull(createdConnection.getComponentConfiguration());
    assertEquals(connectionConfig.getIdentifier(), createdConnection.getComponentConfiguration().getIdentifier());
}