### Question:
ImmutableElement implements Element { @Override public int hashCode() { return Objects. hash(this.name,this.parameters); } ImmutableElement(String name, List<ImmutableElementParameter> parameters); @Override String name(); @Override ImmutableList<Parameter> parameters(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testHashCodeEqualsContract$equal() throws Exception { ImmutableElement sut = createElement("header"); ImmutableElement other = createElement("header"); assertThat(sut,equalTo(other)); assertThat(sut.hashCode(),equalTo(other.hashCode())); }
@Test public void testHashCodeEqualsContract$differentHeader() throws Exception { ImmutableElement sut = createElement("header1"); ImmutableElement other = createElement("header2"); assertThat(sut,not(equalTo(other))); assertThat(sut.hashCode(),not(equalTo(other.hashCode()))); }
@Test public void testHashCodeEqualsContract$differentParameters() throws Exception { ImmutableElement sut = createElement("header1",createParameter("param1","value")); ImmutableElement other = createElement("header1",createParameter("param2","value")); assertThat(sut,not(equalTo(other))); assertThat(sut.hashCode(),not(equalTo(other.hashCode()))); }