public static <T> Mono<Long> writeAll(Writer writer, Flux<T> values) throws IOException {
        return writeAll(DEFAULT_OBJECT_MAPPER, writer, values);
    }
@Test
    void writeAll_fromMultiValuedSource() throws IOException {
        final Path outputTempFilePath = createTempFile();

        final List<SimpleEntry> inputValues = List.of(new SimpleEntry(1, "value1"), new SimpleEntry(2, "value2"), new SimpleEntry(3, "value3"));
        final Long outputCount = FileSerde.writeAll(Files.newBufferedWriter(outputTempFilePath), Flux.fromIterable(inputValues)).block();
        assertThat(outputCount, is(3L));

        final List<String> outputLines = Files.readAllLines(outputTempFilePath);
        assertThat(outputLines, hasSize(3));
        assertThat(outputLines.getFirst(), equalTo("{id:1,value:\"value1\"}"));
        assertThat(outputLines.get(1), equalTo("{id:2,value:\"value2\"}"));
        assertThat(outputLines.get(2), equalTo("{id:3,value:\"value3\"}"));
    }