### Question:
GenericAddress implements Address { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof GenericAddress)) { return false; } GenericAddress addr = (GenericAddress) o; return addrSpace.equals(addr.getAddressSpace()) && offset == addr.offset; } GenericAddress(long offset, AddressSpace addrSpace);   GenericAddress(AddressSpace addrSpace, long offset); @Override Address getAddress(String addrString); @Override Address getNewAddress(long byteOffset); @Override Address getNewAddress(long addrOffset, boolean isAddressableWordOffset); @Override Address getNewTruncatedAddress(long addrOffset, boolean isAddressableWordOffset); @Override long getOffset(); @Override long getAddressableWordOffset(); @Override long getUnsignedOffset(); @Override AddressSpace getAddressSpace(); @Override int getSize(); @Override long subtract(Address addr); @Override Address subtractWrap(long displacement); @Override Address subtractWrapSpace(long displacement); @Override Address subtractNoWrap(long displacement); @Override Address subtract(long displacement); @Override Address addWrap(long displacement); @Override Address addWrapSpace(long displacement); @Override Address addNoWrap(long displacement); @Override Address addNoWrap(BigInteger displacement); @Override Address add(long displacement); @Override boolean isSuccessor(Address addr); @Override int compareTo(Address a); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override String toString(String prefix); @Override String toString(boolean showAddressSpace); @Override String toString(boolean showAddressSpace, boolean pad); @Override String toString(boolean showAddressSpace, int minNumDigits); @Override boolean hasSameAddressSpace(Address addr); @Override Address next(); @Override Address previous(); @Override Address getPhysicalAddress(); @Override int getPointerSize(); @Override boolean isMemoryAddress(); @Override boolean isLoadedMemoryAddress(); @Override boolean isNonLoadedMemoryAddress(); @Override boolean isHashAddress(); @Override boolean isStackAddress(); @Override boolean isUniqueAddress(); @Override boolean isConstantAddress(); @Override boolean isVariableAddress(); @Override boolean isRegisterAddress(); @Override boolean isExternalAddress(); @Override BigInteger getOffsetAsBigInteger();  }### Answer:
@Test public void testEquals() { Address addr1 = new GenericAddress(space, 10); Address addr2 = addr1.getNewAddress(20); Address addr3 = addr1.getNewAddress(10); assertTrue(!addr1.equals(addr2)); assertTrue(!addr2.equals(addr1)); assertTrue(addr1.equals(addr3)); Address addr4 = new GenericAddress(space, 10); assertTrue(addr1.equals(addr4)); AddressSpace sp = new GenericAddressSpace("AnotherTest", 8, AddressSpace.TYPE_RAM, 1); Address addr5 = new GenericAddress(sp, 10); assertTrue(!addr5.equals(addr1)); }