DomainInfo { @Override public int hashCode() { return Objects.hash(this.domain, this.domainVersion); } DomainInfo(final String domain, final String domainVersion); String getDomain(); String getDomainVersion(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testHashCode() { final DomainInfo domainInfo = new DomainInfo(DOMAIN_PUBLIC_LIGHTING, DOMAIN_VERSION); final int expected = DOMAIN_INFO_PUBLIC_LIGHTING.hashCode(); final int actual = domainInfo.hashCode(); assertThat(actual).isEqualTo(expected); }