### Question:
TilePyramid { public TileCover cover(Bounds e, int width, int height) { Pair<Double,Double> res = res(e, width, height); return cover(e, res.first, res.second); }  static TilePyramidBuilder build(); List<TileGrid> grids(); Bounds bounds(); TilePyramid bounds(Bounds bounds); CoordinateReferenceSystem crs(); TilePyramid crs(CoordinateReferenceSystem crs); Origin origin(); TilePyramid origin(Origin origin); Integer tileWidth(); TilePyramid tileWidth(Integer tileWidth); Integer tileHeight(); TilePyramid tileHeight(Integer tileHeight); TileGrid grid(int z); Bounds bounds(Tile t); Tile realign(Tile t, Origin o); TileCover cover(Bounds e, int width, int height); TileCover cover(Bounds e, double resx, double resy); TileCover cover(Bounds e, int z); TileCover cover(Bounds e, TileGrid grid);  }### Answer:
@Test public void testCover() { Bounds b = tp.bounds(); TileCover cov = tp.cover(b, 1); assertEquals(4, cov.width()); assertEquals(2, cov.height()); assertEquals(0, cov.x0()); assertEquals(0, cov.y0()); assertEquals(3, cov.x1()); assertEquals(1, cov.y1()); cov = tp.cover(Bounds.translate(b, -b.getWidth() / 2f, -b.getHeight() / 2f), 1); assertEquals(4, cov.width()); assertEquals(2, cov.height()); assertEquals(-2, cov.x0()); assertEquals(-1, cov.y0()); assertEquals(1, cov.x1()); assertEquals(0, cov.y1()); cov = tp.cover(Bounds.scale(b, 0.1), 1); assertEquals(2, cov.width()); assertEquals(2, cov.height()); assertEquals(1, cov.x0()); assertEquals(0, cov.y0()); assertEquals(2, cov.x1()); assertEquals(1, cov.y1()); }