### Question:
MultipleAddresses { @Override public boolean equals(Object o) { if (this == o) { return true; } else if (o == null || getClass() != o.getClass()) { return false; } MultipleAddresses that = (MultipleAddresses) o; return Objects.equals(addresses, that.addresses); } MultipleAddresses();  MultipleAddresses(Collection<InetSocketAddress> addresses);  MultipleAddresses(InetSocketAddress address);  MultipleAddresses(Collection<InetSocketAddress> addresses, Duration timeout); boolean isEmpty(); Set<InetSocketAddress> getAllAddresses(); Set<InetSocketAddress> getWildcardAddresses(); List<Integer> getAllPorts(); List<String> getAllHostStrings(); void addAddress(InetSocketAddress address); InetSocketAddress getReachableAddress(); Set<InetSocketAddress> getAllReachableAddresses(); Set<InetSocketAddress> getAllReachableAddressesOrAll(); InetSocketAddress getReachableOrOne(); void recreateSocketAddresses(); InetSocketAddress getOne(); int size(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final Duration DEFAULT_TIMEOUT; }### Answer:
@Test public void testEquals() { List<InetSocketAddress> addresses = getAddressList(); MultipleAddresses multipleAddresses = new MultipleAddresses(addresses); MultipleAddresses multipleAddressesEquals = new MultipleAddresses(addresses); assertEquals(multipleAddresses, multipleAddressesEquals); MultipleAddresses multipleAddressesNotEquals = new MultipleAddresses(getAddressList()); assertNotEquals(multipleAddresses, multipleAddressesNotEquals); }