### Question:
BingTileFunctions { @Description("Given a Bing tile, returns zoom level of the tile") @ScalarFunction("bing_tile_zoom_level") @SqlType(StandardTypes.TINYINT) public static long bingTileZoomLevel(@SqlType(BingTileType.NAME) long input) { return BingTile.decode(input).getZoomLevel(); } private  BingTileFunctions(); @Description("Creates a Bing tile from XY coordinates and zoom level") @ScalarFunction("bing_tile") @SqlType(BingTileType.NAME) static long toBingTile(@SqlType(StandardTypes.INTEGER) long tileX, @SqlType(StandardTypes.INTEGER) long tileY, @SqlType(StandardTypes.INTEGER) long zoomLevel); @Description("Given a Bing tile, returns its QuadKey") @ScalarFunction("bing_tile_quadkey") @SqlType(StandardTypes.VARCHAR) static Slice toQuadKey(@SqlType(BingTileType.NAME) long input); @Description("Given a Bing tile, returns zoom level of the tile") @ScalarFunction("bing_tile_zoom_level") @SqlType(StandardTypes.TINYINT) static long bingTileZoomLevel(@SqlType(BingTileType.NAME) long input); @Description("Creates a Bing tile from a QuadKey") @ScalarFunction("bing_tile") @SqlType(BingTileType.NAME) static long toBingTile(@SqlType(StandardTypes.VARCHAR) Slice quadKey); @Description("Given a (latitude, longitude) point, returns the containing Bing tile at the specified zoom level") @ScalarFunction("bing_tile_at") @SqlType(BingTileType.NAME) static long bingTileAt(
            @SqlType(StandardTypes.DOUBLE) double latitude,
            @SqlType(StandardTypes.DOUBLE) double longitude,
            @SqlType(StandardTypes.INTEGER) long zoomLevel); @Description("Given a (longitude, latitude) point, returns the surrounding Bing tiles at the specified zoom level") @ScalarFunction("bing_tiles_around") @SqlType("array(" + BingTileType.NAME + ")") static Block bingTilesAround(
            @SqlType(StandardTypes.DOUBLE) double latitude,
            @SqlType(StandardTypes.DOUBLE) double longitude,
            @SqlType(StandardTypes.INTEGER) long zoomLevel); @Description("Given a (latitude, longitude) point, a radius in kilometers and a zoom level, " + "returns a minimum set of Bing tiles at specified zoom level that cover a circle of " + "specified radius around the specified point.") @ScalarFunction("bing_tiles_around") @SqlType("array(" + BingTileType.NAME + ")") static Block bingTilesAround(
            @SqlType(StandardTypes.DOUBLE) double latitude,
            @SqlType(StandardTypes.DOUBLE) double longitude,
            @SqlType(StandardTypes.INTEGER) long zoomLevelAsLong,
            @SqlType(StandardTypes.DOUBLE) double radiusInKm); @Description("Given a Bing tile, returns the polygon representation of the tile") @ScalarFunction("bing_tile_polygon") @SqlType(GEOMETRY_TYPE_NAME) static Slice bingTilePolygon(@SqlType(BingTileType.NAME) long input); @Description("Given a geometry and a zoom level, returns the minimum set of Bing tiles that fully covers that geometry") @ScalarFunction("geometry_to_bing_tiles") @SqlType("array(" + BingTileType.NAME + ")") static Block geometryToBingTiles(@SqlType(GEOMETRY_TYPE_NAME) Slice input, @SqlType(StandardTypes.INTEGER) long zoomLevelInput);  }### Answer:
@Test public void testBingTileZoomLevel() { assertFunction("bing_tile_zoom_level(bing_tile('213'))", TINYINT, (byte) 3); assertFunction("bing_tile_zoom_level(bing_tile('123030123010121'))", TINYINT, (byte) 15); }