public static long getMapSize(byte zoomLevel, int tileSize) {
        if (zoomLevel < 0) {
            throw new IllegalArgumentException("zoom level must not be negative: " + zoomLevel);
        }
        return (long) tileSize << zoomLevel;
    }
@Test
    public void getMapSizeTest() {
        for (int tileSize : TILE_SIZES) {
            for (byte zoomLevel = ZOOM_LEVEL_MIN; zoomLevel <= ZOOM_LEVEL_MAX; ++zoomLevel) {
                long factor = Math.round(MercatorProjection.zoomLevelToScaleFactor(zoomLevel));
                Assert.assertEquals(tileSize * factor, MercatorProjection.getMapSize(zoomLevel, tileSize));
                Assert.assertEquals(MercatorProjection.getMapSizeWithScaleFactor(MercatorProjection.zoomLevelToScaleFactor(zoomLevel), tileSize),
                        MercatorProjection.getMapSize(zoomLevel, tileSize));
            }
            verifyInvalidGetMapSize((byte) -1, tileSize);
        }
    }