### Question:
ImmutableElementParameter implements Parameter { @Override public int hashCode() { return Objects. hash(this.name,this.value); } ImmutableElementParameter(String name, String value); @Override String name(); @Override String value(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testHashCodeEqualsContract$equal() throws Exception { ImmutableElementParameter sut = createParameter("header", "value"); ImmutableElementParameter other = createParameter("header", "value"); assertThat(sut,equalTo(other)); assertThat(sut.hashCode(),equalTo(other.hashCode())); }
@Test public void testHashCodeEqualsContract$differentHeader() throws Exception { ImmutableElementParameter sut = createParameter("header1", "value"); ImmutableElementParameter other = createParameter("header2", "value"); assertThat(sut,not(equalTo(other))); assertThat(sut.hashCode(),not(equalTo(other.hashCode()))); }
@Test public void testHashCodeEqualsContract$differentValue() throws Exception { ImmutableElementParameter sut = createParameter("header", "value1"); ImmutableElementParameter other = createParameter("header", "value2"); assertThat(sut,not(equalTo(other))); assertThat(sut.hashCode(),not(equalTo(other.hashCode()))); }
@Test public void testHashCodeEqualsContract$differentParts() throws Exception { ImmutableElementParameter sut = createParameter("header1", "value1"); ImmutableElementParameter other = createParameter("header2", "value2"); assertThat(sut,not(equalTo(other))); assertThat(sut.hashCode(),not(equalTo(other.hashCode()))); }