@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()))); }
@Override public int hashCode() { return Objects. hash(this.name,this.parameters); }
ImmutableElement implements Element { @Override public int hashCode() { return Objects. hash(this.name,this.parameters); } }
ImmutableElement implements Element { @Override public int hashCode() { return Objects. hash(this.name,this.parameters); } ImmutableElement(String name, List<ImmutableElementParameter> parameters); }
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(); }
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();  }