### Question:
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } Locator(); private  Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricName(); boolean equals(Locator other); static Locator createLocatorFromPathComponents(String tenantId, String... parts); static Locator createLocatorFromDbKey(String fullyQualifiedMetricName); @Override int compareTo(Locator o); static final String METRIC_TOKEN_SEPARATOR; static final String METRIC_TOKEN_SEPARATOR_REGEX; }### Answer:
@Test public void equalsNullReturnsFalse() { Locator locator = new Locator(); assertFalse(locator.equals((Object)null)); }
@Test public void equalsNonLocatorReturnsFalse() { Locator locator = new Locator(); assertFalse(locator.equals(new Object())); }
@Test public void equalsBothUninitializedReturnsTrue() { Locator locator = new Locator(); Locator other = new Locator(); assertTrue(locator.equals((Object)other)); }