RsId { @Override public int hashCode() { return Objects.hash(id); } private  RsId(int id); static RsId of(int id); static RsId of(String id); static RsId empty(); int getId(); boolean isEmpty(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }
@Test public void testHashCode() { RsId other = RsId.of(ID); int expected = other.hashCode(); assertThat(instance.hashCode(), equalTo(expected)); }