RsId { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RsId rsId = (RsId) o; return id == rsId.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 testEqualsNotNull() { assertThat(instance.equals(null), is(false)); }
@Test public void testEqualsNotSomethingElse() { assertThat(instance.equals("1335464574"), is(false)); }
@Test public void testEquals() { assertThat(instance.equals(RsId.of(ID)), is(true)); }