Code review comment: nit: `Mono.when` could be used here instead

Code under review:
public static void main(String[] args) throws InterruptedException {
        
        
        String connectionString = "endpoint={endpoint_value};id={id_value};secret={secret_value}";

        
        ConfigurationAsyncClient client = new ConfigurationClientBuilder()
                                              .connectionString(connectionString)
                                              .buildAsyncClient();

        
        String prodDBConnectionKey = "prodDBConnection";
        String prodDBConnectionLabel = "prodLabel";
        String updatedProdDBConnectionValue = "updateProdValue";

        
        List<ConfigurationSetting> watchingSettings = new ArrayList<>();
        Flux.concat(
            client.addConfigurationSetting(prodDBConnectionKey, prodDBConnectionLabel, "prodValue"),
            client.addConfigurationSetting("stageDBConnection", "stageLabel", "stageValue"))
            .then(client.listConfigurationSettings(new SettingSelector().setKeyFilter("*")).collectList())
            .subscribe(
                settings -> watchingSettings.addAll(settings),
                error -> System.err.printf("There was an error while adding the settings: %s.%n", error),
                () -> System.out.println("Add settings completed.")
            );

        
        
        
        TimeUnit.MILLISECONDS.sleep(1000);

        System.out.println("Watching settings:");
        for (ConfigurationSetting setting : watchingSettings) {
            System.out.printf("\tWatching key=%s, label=%s, value=%s, ETag=%s.%n",
                setting.getKey(), setting.getLabel(), setting.getValue(), setting.getETag());
        }
        TimeUnit.MILLISECONDS.sleep(1000);

        
        client.setConfigurationSetting(prodDBConnectionKey, prodDBConnectionLabel, updatedProdDBConnectionValue)
            .subscribe(
                updatedSetting -> {
                    System.out.println("Updated settings:");
                    System.out.printf("\tUpdated key=%s, label=%s, value=%s, ETag=%s.%n",
                        updatedSetting.getKey(), updatedSetting.getLabel(), updatedSetting.getValue(),
                        updatedSetting.getETag());
                },
                error -> System.err.printf("There was an error while updating the setting: %s.%n", error),
                () -> System.out.printf("Update setting completed, key=%s, label=%s, value=%s.%n",
                    prodDBConnectionKey, prodDBConnectionLabel, updatedProdDBConnectionValue));
        TimeUnit.MILLISECONDS.sleep(1000);

        
        List<ConfigurationSetting> refreshedSettings = refresh(client, watchingSettings);
        System.out.println("Refreshed settings:");
        for (ConfigurationSetting setting : refreshedSettings) {
            System.out.printf("\tRefreshed key=%s, label=%s, value=%s, ETag=%s.%n",
                setting.getKey(), setting.getLabel(), setting.getValue(), setting.getETag());
        }
        TimeUnit.MILLISECONDS.sleep(1000);

        
        System.out.println("Deleting settings:");
        Stream<ConfigurationSetting> stream = watchingSettings == null ? Stream.empty() : watchingSettings.stream();
        Flux.merge(stream.map(setting -> {
            System.out.printf("\tDeleting key: %s, value: %s.%n", setting.getKey(), setting.getValue());
            return client.deleteConfigurationSettingWithResponse(setting, false);
        }).collect(Collectors.toList())).blockLast();
    }

Line commented on: Flux.concat(

Revised code:
public static void main(String[] args) throws InterruptedException {
        
        
        String connectionString = "endpoint={endpoint_value};id={id_value};secret={secret_value}";

        
        ConfigurationAsyncClient client = new ConfigurationClientBuilder()
                                              .connectionString(connectionString)
                                              .buildAsyncClient();

        
        String prodDBConnectionKey = "prodDBConnection";
        String prodDBConnectionLabel = "prodLabel";
        String updatedProdDBConnectionValue = "updateProdValue";

        
        List<ConfigurationSetting> watchingSettings = new ArrayList<>();
        Flux.concat(
            client.addConfigurationSetting(prodDBConnectionKey, prodDBConnectionLabel, "prodValue"),
            client.addConfigurationSetting("stageDBConnection", "stageLabel", "stageValue"))
            .then(client.listConfigurationSettings(new SettingSelector().setKeyFilter("*")).collectList())
            .subscribe(
                settings -> watchingSettings.addAll(settings),
                error -> System.err.printf("There was an error while adding the settings: %s.%n", error),
                () -> System.out.println("Add settings completed.")
            );

        
        
        
        TimeUnit.MILLISECONDS.sleep(1000);

        System.out.println("Watching settings:");
        for (ConfigurationSetting setting : watchingSettings) {
            System.out.printf("\tWatching key=%s, label=%s, value=%s, ETag=%s.%n",
                setting.getKey(), setting.getLabel(), setting.getValue(), setting.getETag());
        }
        TimeUnit.MILLISECONDS.sleep(1000);

        
        client.setConfigurationSetting(prodDBConnectionKey, prodDBConnectionLabel, updatedProdDBConnectionValue)
            .subscribe(
                updatedSetting -> {
                    System.out.println("Updated settings:");
                    System.out.printf("\tUpdated key=%s, label=%s, value=%s, ETag=%s.%n",
                        updatedSetting.getKey(), updatedSetting.getLabel(), updatedSetting.getValue(),
                        updatedSetting.getETag());
                },
                error -> System.err.printf("There was an error while updating the setting: %s.%n", error),
                () -> System.out.printf("Update setting completed, key=%s, label=%s, value=%s.%n",
                    prodDBConnectionKey, prodDBConnectionLabel, updatedProdDBConnectionValue));
        TimeUnit.MILLISECONDS.sleep(1000);

        
        List<ConfigurationSetting> refreshedSettings = refresh(client, watchingSettings);
        System.out.println("Refreshed settings:");
        for (ConfigurationSetting setting : refreshedSettings) {
            System.out.printf("\tRefreshed key=%s, label=%s, value=%s, ETag=%s.%n",
                setting.getKey(), setting.getLabel(), setting.getValue(), setting.getETag());
        }
        TimeUnit.MILLISECONDS.sleep(1000);

        
        System.out.println("Deleting settings:");
        Stream<ConfigurationSetting> stream = watchingSettings == null ? Stream.empty() : watchingSettings.stream();
        Flux.merge(stream.map(setting -> {
            System.out.printf("\tDeleting key: %s, value: %s.%n", setting.getKey(), setting.getValue());
            return client.deleteConfigurationSettingWithResponse(setting, false);
        }).collect(Collectors.toList())).blockLast();
    }