### Question:
AckImpl implements Ack { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Ack)) { return false; } final AckImpl other = (AckImpl) obj; return channelId == null ? other.channelId == null : channelId.equals(other.channelId); } AckImpl(final String channelId, final long version); @Override String getChannelId(); @Override long getVersion(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj);  }### Answer:
@Test public void equalsContractConsistent() { final Ack x = new AckImpl("ch1", 10L); final Ack y = new AckImpl("ch2", 10L); assertThat(x.equals(y), is(false)); }
@Test public void equalsContractNull() { final Ack x = new AckImpl("ch1", 10L); assertThat(x.equals(null), is(false)); }
@Test public void versionNotPartOfContract() { final Ack x = new AckImpl("ch1", 11L); final Ack y = new AckImpl("ch1", 12L); assertThat(x.equals(y), is(true)); }