DefaultRequestArguments implements RequestArguments { @Override public RequestArguments withHeader(final String name, final String value) { return headers(headers.assoc(name, getOrDefault(headers, name).append(value))); } DefaultRequestArguments(); @Override Optional<T> getAttribute(final Attribute<T> attribute); URI getRequestUri(); @Override RequestArguments replaceUriVariables(final List<Object> additionalUriVariables); @Override RequestArguments withAttribute(final Attribute<T> attribute, final T value); @Override RequestArguments withQueryParam(final String name, final String value); @Override RequestArguments withQueryParams(final Map<String, ? extends Collection<String>> additionalQueryParams); @Override RequestArguments withoutQueryParam(final String name); @Override RequestArguments replaceQueryParams(final Map<String, ? extends Collection<String>> queryParams); @Override RequestArguments withHeader(final String name, final String value); @Override RequestArguments withHeaders(final Map<String, ? extends Collection<String>> additionalHeaders); @Override RequestArguments withoutHeader(final String name); @Override RequestArguments replaceHeaders(final Map<String, ? extends Collection<String>> headers);  }
@Test void headersShouldBeCaseInsensitive() { final RequestArguments arguments = unit.withHeader("Foo", "bar"); assertTrue(arguments.getHeaders().containsKey("foo")); }