@Test
  void headerMapWithHeaderAnnotations() throws Exception {
    server.enqueue(new MockResponse());

    TestInterface api = new TestInterfaceBuilder().target("http://localhost:" + server.getPort());

    Map<String, Object> headerMap = new LinkedHashMap<>();
    headerMap.put("Custom-Header", "fooValue");
    api.headerMapWithHeaderAnnotations(headerMap);

    // header map should be additive for headers provided by annotations
    assertThat(server.takeRequest())
        .hasHeaders(
            entry("Content-Encoding", Collections.singletonList("deflate")),
            entry("Custom-Header", Collections.singletonList("fooValue")));

    server.enqueue(new MockResponse());
    headerMap.put("Content-Encoding", "overrideFromMap");

    api.headerMapWithHeaderAnnotations(headerMap);

    /*
     * @HeaderMap map values no longer override @Header parameters. This caused confusion as it is
     * valid to have more than one value for a header.
     */
    assertThat(server.takeRequest())
        .hasHeaders(
            entry("Content-Encoding", Arrays.asList("deflate", "overrideFromMap")),
            entry("Custom-Header", Collections.singletonList("fooValue")));
  }
The type of a parameter value may not be the desired type to encode as. Prefer the interface
type.
core/src/test/java/feign/FeignUnderAsyncTest.java