### Question:
AbstractTileSource implements TileSource { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof AbstractTileSource)) { return false; } AbstractTileSource other = (AbstractTileSource) obj; if (!java.util.Arrays.equals(this.hostNames, other.hostNames)) { return false; } else if (this.port != other.port) { return false; } return true; } protected  AbstractTileSource(String[] hostNames, int port); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void equalsTest() { AbstractTileSource abstractTileSource1 = OpenStreetMapMapnik.INSTANCE; AbstractTileSource abstractTileSource2 = OpenStreetMapMapnik.INSTANCE; AbstractTileSource abstractTileSource3 = OpenCycleMap.INSTANCE; TestUtils.equalsTest(abstractTileSource1, abstractTileSource2); Assert.assertNotEquals(abstractTileSource1, abstractTileSource3); Assert.assertNotEquals(abstractTileSource3, abstractTileSource1); Assert.assertNotEquals(abstractTileSource1, new Object()); }