### Question:
DefaultChannel implements Channel { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Channel)) { return false; } final DefaultChannel o = (DefaultChannel) obj; return (uaid == null ? o.uaid == null : uaid.equals(o.uaid)) && (channelId == null ? o.channelId == null : channelId.equals(o.channelId)) && (endpointToken == null ? o.endpointToken == null : endpointToken.equals(o.endpointToken)) && (version == o.version); } DefaultChannel(final String uaid, final String channelId, final String endpointToken);  DefaultChannel(final String uaid, final String channelId, final long version, final String endpointToken); @Override String getUAID(); @Override String getChannelId(); @Override long getVersion(); @Override String getEndpointToken(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void equalsConsistent() { final Channel x = new DefaultChannel("test", "123abc", 1, "33ddd2elaeee"); final Channel y = new DefaultChannel("test", "xyz987", 1, "33ddd2elaeee"); assertThat(x.equals(y), is(false)); }
@Test public void equalsContractNull() { final Channel x = new DefaultChannel("test", "123abc", 1, "33ddd2elaeee"); assertThat(x.equals(null), is(false)); }