@Test
public void migrateConnectionWithGlobalAuthorizationContext() {

    final Connection migratedConnection =
            ConnectionMigrationUtil.connectionFromJsonWithMigration(KNOWN_CONNECTION_JSON);
    assertThat((CharSequence) migratedConnection.getId()).isEqualTo(ID);
    assertThat(migratedConnection.getName()).contains(NAME);
    assertThat((Object) migratedConnection.getConnectionType()).isEqualTo(TYPE);
    assertThat(migratedConnection.getUri()).isEqualTo(URI);
    migratedConnection.getSources().forEach(source ->
            assertThat(source.getAuthorizationContext()).isEqualTo(AUTHORIZATION_CONTEXT));
    migratedConnection.getTargets().forEach(target ->
            assertThat(target.getAuthorizationContext()).isEqualTo(AUTHORIZATION_CONTEXT));
}