public void shouldNotMutateInternalHeadersMap() {
    RequestTemplate template = new RequestTemplate().header("key1", "valid");

    assertThat(template.headers()).hasSize(1);
    assertThat(template.headers().keySet()).containsExactly("key1");
    assertThat(template.headers().get("key1")).containsExactly("valid");

    template.headers().put("key2", Collections.singletonList("other value"));
    // nothing should change
    assertThat(template.headers()).hasSize(1);
    assertThat(template.headers().keySet()).containsExactly("key1");
    assertThat(template.headers().get("key1")).containsExactly("valid");

    template.headers().get("key1").add("value2");
    // nothing should change either
    assertThat(template.headers()).hasSize(1);
    assertThat(template.headers().keySet()).containsExactly("key1");
    assertThat(template.headers().get("key1")).containsExactly("valid");
  }
Implementations have a bug if they pass junk as the http method.
core/src/test/java/feign/RequestTemplateTest.java