HeaderFilters { @API(status = MAINTAINED) public static HeaderFilter defaultValue() { return defaultValues(HeaderFilter.class).stream() .reduce(authorization(), HeaderFilter::merge); } private  HeaderFilters(); @API(status = MAINTAINED) static HeaderFilter defaultValue(); @API(status = MAINTAINED) static HeaderFilter authorization(); static HeaderFilter replaceHeaders(
            final String name,
            final String replacement); static HeaderFilter replaceHeaders(
            final Collection<String> names,
            final String replacement); static HeaderFilter replaceCookies(
            final Predicate<String> predicate, final String replacement); static HeaderFilter replaceHeaders(
            final Predicate<String> keyPredicate,
            final String replacement); static HeaderFilter replaceHeaders(
            final BiPredicate<String, String> predicate,
            final String replacement); static HeaderFilter eachHeader(
            final BinaryOperator<String> operator); static HeaderFilter removeHeaders(
            final String... names); static HeaderFilter removeHeaders(
            final Predicate<String> predicate); static HeaderFilter removeHeaders(
            final BiPredicate<String, String> predicate);  }
@Test void authorizationShouldFilterAuthorizationByDefault() { final HeaderFilter unit = defaultValue(); assertThat( unit.filter(HttpHeaders.of("Authorization", "Bearer c61a8f84-6834-11e5-a607-10ddb1ee7671", "Basic dXNlcjpwYXNzd29yZA==")), hasEntry("Authorization", Arrays.asList("XXX", "XXX"))); }
@Test void authorizationShouldNotFilterNonAuthorizationByDefault() { final HeaderFilter unit = defaultValue(); assertThat( unit.filter(HttpHeaders.of("Accept", "text/plain")), hasEntry("Accept", singletonList("text/plain"))); }