@Test public void testHashCodeEqualsContract$differentValue() throws Exception { ImmutableHeader sut = createHeader("header", "value1"); ImmutableHeader other = createHeader("header", "value2"); assertThat(sut,not(equalTo(other))); assertThat(sut.hashCode(),not(equalTo(other.hashCode()))); }
@Override public int hashCode() { return Objects. hash(this.name,this.rawValue,this.elements); }
ImmutableHeader implements Header { @Override public int hashCode() { return Objects. hash(this.name,this.rawValue,this.elements); } }
ImmutableHeader implements Header { @Override public int hashCode() { return Objects. hash(this.name,this.rawValue,this.elements); } ImmutableHeader(String name, String rawValue, List<ImmutableElement> elements); }
ImmutableHeader implements Header { @Override public int hashCode() { return Objects. hash(this.name,this.rawValue,this.elements); } ImmutableHeader(String name, String rawValue, List<ImmutableElement> elements); @Override String name(); @Override String rawValue(); @Override ImmutableList<Element> elements(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
ImmutableHeader implements Header { @Override public int hashCode() { return Objects. hash(this.name,this.rawValue,this.elements); } ImmutableHeader(String name, String rawValue, List<ImmutableElement> elements); @Override String name(); @Override String rawValue(); @Override ImmutableList<Element> elements(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }