### Question:
Tile implements Serializable { public long getShiftX(Tile otherTile) { if (this.equals(otherTile)) { return 0; } return this.tileX % 2 + 2 * getParent().getShiftX(otherTile); } Tile(long tileX, long tileY, byte zoomLevel); static long getMaxTileNumber(byte zoomLevel); @Override boolean equals(Object obj); Tile getParent(); long getShiftX(Tile otherTile); long getShiftY(Tile otherTile); @Override int hashCode(); @Override String toString(); final long tileX; final long tileY; final byte zoomLevel; }### Answer:
@Test public void getShiftXTest() { Tile tile0 = new Tile(0, 0, (byte) 0); Tile tile1 = new Tile(0, 1, (byte) 1); Tile tile2 = new Tile(1, 2, (byte) 2); Assert.assertEquals(0, tile0.getShiftX(tile0)); Assert.assertEquals(0, tile1.getShiftX(tile0)); Assert.assertEquals(1, tile2.getShiftX(tile0)); Assert.assertEquals(1, tile2.getShiftX(tile1)); }