### Question:
TileSetCoordinateSpace { public Pixel toPixel(Point<C2D> point) { return this.mupTransform.toPixel(point.getPosition()); } TileSetCoordinateSpace(Point<C2D> origin, Dimension tileDimension, Envelope<C2D> extent, double unitsPerPixel); Envelope<C2D> boundingBox(TileCoordinate coordinate); PixelRange tilePixelRange(TileCoordinate coordinate); Dimension tileSetPixelDimension(); double tileWidthInMapUnits(); double tileHeightInMapUnits(); TileCoordinate tileCoordinateContaining(Point<C2D> point, boolean lowerLeftInclusive); double unitsPerPixel(); PixelRange pixelRange(Envelope<C2D> bbox); Pixel toPixel(Point<C2D> point); Point<C2D> toPoint(Pixel pixel);  }### Answer:
@Test public void test_to_pixel() { Pixel expected = space1.toPixel(point(crs, c(50, 50))); Pixel received = Pixel.valueOf(0, 199); assertEquals(expected, received); received = space1.toPixel(point(crs, c(1050, 1050))); expected = Pixel.valueOf(199, 0); assertEquals(expected, received); received = space1.toPixel(point(crs, c(1050, 50))); expected = Pixel.valueOf(199, 199); assertEquals(expected, received); received = space1.toPixel(point(crs, c(50, 1050))); expected = Pixel.valueOf(0, 0); assertEquals(expected, received); received = space1.toPixel(point(crs, c(100, 250))); expected = Pixel.valueOf(10, 160); assertEquals(expected, received); received = space1.toPixel(point(crs, c(287, 1023))); expected = Pixel.valueOf(47, 5); assertEquals(expected, received); received = space1.toPixel(point(crs, c(1200, 2000))); expected = Pixel.valueOf(230, -190); assertEquals("Points outside TILE_MAP extent are allowed.", expected, received); received = space1.toPixel(point(crs, c(0, 0))); expected = Pixel.valueOf(-10, 210); assertEquals("Points outside TILE_MAP extent are allowed.", received, expected); }