### Question:
AddressEndpointKeyEquivalence extends Equivalence<AddressEndpointKey> { @Override protected boolean doEquivalent(final AddressEndpointKey a, final AddressEndpointKey b) { if (!Objects.equal(a.getContextType(), b.getContextType())) { return false; } if (!Objects.equal(a.getAddressType(), b.getAddressType())) { return false; } if (!Objects.equal(a.getAddress(), b.getAddress())) { return false; } if (!Objects.equal(a.getContextId(), b.getContextId())) { return false; } return true; }    }### Answer:
@Test public void testDoEquivalent() throws Exception { Assert.assertTrue(addressEndpointKeyEquivalence.equivalent(addressEndpointLocation, rendererEndpoint)); final Predicate<AddressEndpointKey> addressPredicate = addressEndpointKeyEquivalence.equivalentTo(addressEndpointLocation); Assert.assertTrue(addressPredicate.apply(rendererEndpoint)); }