public void addIfValid(String headerName, String value) {
        Objects.requireNonNull(headerName, "headerName");
        Objects.requireNonNull(value, "value");
        if (isValid(headerName) && isValid(value)) {
            String normalName = HeaderName.normalize(headerName);
            addNormal(headerName, normalName, value);
        }
    }
@Test
    void addIfValid() {
        Headers headers = new Headers();
        headers.addIfValid("Via", "duct");
        headers.addIfValid("Cookie", "abc=def");
        headers.addIfValid("cookie", "uvw=xyz");

        Truth.assertThat(headers.getAll("Via")).containsExactly("duct");
        Truth.assertThat(headers.getAll("Cookie"))
                .containsExactly("abc=def", "uvw=xyz")
                .inOrder();
        Truth.assertThat(headers.size()).isEqualTo(3);
    }