@Test
    void formatWithFilenameWithQuotes() {
        final BiConsumer<String, String> tester = (input, output) -> {
            assertThat(ContentDisposition.builder("form-data")
                                         .filename(input)
                                         .build()
                                         .toString())
                    .isEqualTo("form-data; filename=\"" + output + '"');

            assertThat(ContentDisposition.builder("form-data")
                                         .filename(input, StandardCharsets.US_ASCII)
                                         .build()
                                         .toString())
                    .isEqualTo("form-data; filename=\"" + output + '"');
        };

        String filename = "\"foo.txt";
        tester.accept(filename, '\\' + filename);

        filename = "\\\"foo.txt";
        tester.accept(filename, filename);

        filename = "\\\\\"foo.txt";
        tester.accept(filename, '\\' + filename);

        filename = "\\\\\\\"foo.txt";
        tester.accept(filename, filename);

        filename = "\\\\\\\\\"foo.txt";
        tester.accept(filename, '\\' + filename);

        tester.accept("\"\"foo.txt", "\\\"\\\"foo.txt");
        tester.accept("\"\"\"foo.txt", "\\\"\\\"\\\"foo.txt");

        tester.accept("foo.txt\\", "foo.txt");
        tester.accept("foo.txt\\\\", "foo.txt\\\\");
        tester.accept("foo.txt\\\\\\", "foo.txt\\\\");
    }
Unit tests for {@link ContentDisposition}.
@author Sebastien Deleuze
@author Rossen Stoyanchev
core/src/test/java/com/linecorp/armeria/common/ContentDispositionTest.java