### Question:
ResourceName implements Distributable { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ResourceName that = (ResourceName) o; return !(name != null ? !name.equals(that.name) : that.name != null); } ResourceName(String aName); String get(); String getOnlyFileName(); @Override boolean equals(Object o); @Override int hashCode(); @Override Map<String, Object> serialize(); static ResourceName deserialize(Map<String, Object> aSerializedData); final String name; }### Answer:
@Test public void testEquals() throws Exception { ResourceName theResourceName = new ResourceName("test"); ResourceName theResourceName2 = new ResourceName("test"); ResourceName theResourceName3 = new ResourceName("other"); ResourceName theResourceName4 = new ResourceName(null); assertTrue(theResourceName.equals(theResourceName)); assertTrue(theResourceName.equals(theResourceName2)); assertFalse(theResourceName.equals(theResourceName3)); assertFalse(theResourceName.equals(null)); assertFalse(theResourceName.equals("test")); assertFalse(theResourceName.equals(theResourceName4)); assertFalse(theResourceName4.equals(theResourceName)); }