### Question:
Header implements AnyRequestModifier { @Generated("Eclipse") @Override public int hashCode() { int prime = HASH_CODE_PRIME; int result = 1; result = prime * result + ((name == null) ? 0 : name.toLowerCase().hashCode()); result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; } Header(String name, String value);  Header(String nameAndValue); String getName(); String getValue(); @Override void applyTo(ServerDriverHttpUriRequest request); @Override String toString(); DateTime asDateTime(); @Generated("Eclipse") @Override int hashCode(); @Generated("Eclipse") @Override boolean equals(Object object);  }### Answer:
@Test public void headerHashCodeIsTheSameForEqualHeaders() { Header header1 = new Header("name", "value"); Header header2 = new Header("name", "value"); assertThat(header1.hashCode(), equalTo(header2.hashCode())); }
@Test public void headerHashCodeIsDifferentForDifferentName() { Header header1 = new Header("name", "value"); Header header2 = new Header("different", "value"); assertThat(header1.hashCode(), not(equalTo(header2.hashCode()))); }
@Test public void headerHashCodeIsDifferentForDifferentValue() { Header header1 = new Header("name", "value"); Header header2 = new Header("name", "different"); assertThat(header1.hashCode(), not(equalTo(header2.hashCode()))); }
@Test public void headerWithNullNameAndValueHasHashCode() { Header header = new Header(null, null); assertThat(header.hashCode() > 0, is(true)); }
@Test public void hashCodeTreatsNameAsCaseInsensitive() { Header upper = new Header("HELLO: there"); Header lower = new Header("hello: there"); assertThat(upper.hashCode(), equalTo(lower.hashCode())); }