### Question:
Id { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Id other = (Id) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } Id(String id); synchronized static Id getEmptyId(); static Id valueOf(String id); String getValue(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void equals_sameObject_returnTrue() { assertThat(target.equals(target), is(true)); }
@Test public void equals_sameId_returnTrue() { assertThat(target.equals(new Id(ID_VALUE)), is(true)); }
@Test public void equals_differentType_returnFalse() { assertThat(target.equals(new Object()), is(false)); }
@Test public void equals_null_returnFalse() { assertThat(target.equals(null), is(false)); }
@Test public void equals_nullId_returnFalse() { assertThat(target.equals(new Id(null)), is(false)); }
@Test public void equals_bothNullId_returnTrue() { Id left = new Id(null); Id right = new Id(null); assertThat(left.equals(right), is(true)); }
@Test public void equals_diffId_returnFalse() { assertThat(target.equals(new Id(ID_VALUE + "0")), is(false)); }