### Question:
ThingFilter { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ThingFilter that = (ThingFilter) o; return method == that.method && Objects.equals(url, that.url) && Objects.equals(query, that.query); } ThingFilter();  ThingFilter(DiscoveryMethod method); DiscoveryMethod getMethod(); ThingFilter setMethod(DiscoveryMethod method); URI getUrl(); ThingFilter setUrl(URI url); ThingQuery getQuery(); ThingFilter setQuery(ThingQuery query); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }### Answer:
@Test public void testEquals() { ThingFilter filterA = new ThingFilter().setMethod(DiscoveryMethod.ANY); ThingFilter filterB = new ThingFilter().setMethod(DiscoveryMethod.ANY); ThingFilter filterC = new ThingFilter().setMethod(DiscoveryMethod.LOCAL); assertEquals(filterA, filterB); assertEquals(filterB, filterA); assertNotEquals(filterA, filterC); assertNotEquals(filterC, filterA); }