### Question:
MercatorProjection { public static long latitudeToTileY(double latitude, double scaleFactor) { return pixelYToTileY(latitudeToPixelY(latitude, scaleFactor, DUMMY_TILE_SIZE), scaleFactor, DUMMY_TILE_SIZE); } private  MercatorProjection(); static double calculateGroundResolution(double latitude, double scaleFactor, int tileSize); static double calculateGroundResolution(double latitude, byte zoomLevel, int tileSize); static LatLong fromPixels(double pixelX, double pixelY, double scaleFactor, int tileSize); static LatLong fromPixels(double pixelX, double pixelY, byte zoomLevel, int tileSize); static long getMapSize(double scaleFactor, int tileSize); static long getMapSize(byte zoomLevel, int tileSize); static Point getPixel(LatLong latLong, double scaleFactor, int tileSize); static Point getPixel(LatLong latLong, byte zoomLevel, int tileSize); static double latitudeToPixelY(double latitude, double scaleFactor, int tileSize); static double latitudeToPixelY(double latitude, byte zoomLevel, int tileSize); static long latitudeToTileY(double latitude, double scaleFactor); static long latitudeToTileY(double latitude, byte zoomLevel); static double longitudeToPixelX(double longitude, double scaleFactor, int tileSize); static double longitudeToPixelX(double longitude, byte zoomLevel, int tileSize); static long longitudeToTileX(double longitude, double scaleFactor); static long longitudeToTileX(double longitude, byte zoomLevel); static double metersToPixels(float meters, double latitude, double scaleFactor, int tileSize); static double metersToPixels(float meters, double latitude, byte zoom, int tileSize); static double pixelXToLongitude(double pixelX, double scaleFactor, int tileSize); static double pixelXToLongitude(double pixelX, byte zoomLevel, int tileSize); static long pixelXToTileX(double pixelX, double scaleFactor, int tileSize); static long pixelXToTileX(double pixelX, byte zoomLevel, int tileSize); static double pixelYToLatitude(double pixelY, double scaleFactor, int tileSize); static double pixelYToLatitude(double pixelY, byte zoomLevel, int tileSize); static long pixelYToTileY(double pixelY, double scaleFactor, int tileSize); static long pixelYToTileY(double pixelY, byte zoomLevel, int tileSize); static double scaleFactorToZoomLevel(double scaleFactor); static long tileToPixel(long tileNumber, int tileSize); static double tileXToLongitude(long tileX, double scaleFactor); static double tileXToLongitude(long tileX, byte zoomLevel); static double tileYToLatitude(long tileY, double scaleFactor); static double tileYToLatitude(long tileY, byte zoomLevel); static double zoomLevelToScaleFactor(byte zoomLevel); static final double EARTH_CIRCUMFERENCE; static final double LATITUDE_MAX; static final double LATITUDE_MIN; }### Answer:
@Test public void latitudeToTileYTest() { for (byte zoomLevel = ZOOM_LEVEL_MIN; zoomLevel <= ZOOM_LEVEL_MAX; ++zoomLevel) { long tileY = MercatorProjection.latitudeToTileY(MercatorProjection.LATITUDE_MAX, zoomLevel); Assert.assertEquals(0, tileY); tileY = MercatorProjection.latitudeToTileY(MercatorProjection.LATITUDE_MAX, MercatorProjection.zoomLevelToScaleFactor(zoomLevel)); Assert.assertEquals(0, tileY); tileY = MercatorProjection.latitudeToTileY(MercatorProjection.LATITUDE_MIN, zoomLevel); Assert.assertEquals(Tile.getMaxTileNumber(zoomLevel), tileY); tileY = MercatorProjection.latitudeToTileY(MercatorProjection.LATITUDE_MIN, MercatorProjection.zoomLevelToScaleFactor(zoomLevel)); Assert.assertEquals(Tile.getMaxTileNumber(zoomLevel), tileY); } }