### Question:
PlotMapCanvasImpl extends Canvas implements
        PlotMapCanvas { public void plot(Point point) { plots.add(point); } PlotMapCanvasImpl(); void clear(); void plot(Point point); @Override void paint(Graphics g); void addRemoveListener(final PointEventListener listener);  }### Answer:
@Test public void testPlotIsDrawnOnScreen() throws Exception { canvas.plot(new Point(2, 2)); Raster raster = Bitmap.of(canvas); Pixel.in(raster).at(2, 2).shouldBe(Color.BLACK); Pixel.in(raster).around(2, 2).shouldBe(Color.WHITE); }
@Test public void testPlotsShouldBeConnectedWithLine() throws Exception { canvas.plot(new Point(3, 10)); canvas.plot(new Point(6, 7)); Raster raster = Bitmap.of(canvas); Pixel.in(raster).at(3, 10).shouldBe(Color.BLACK); Pixel.in(raster).at(4, 9).shouldBe(Color.BLACK); Pixel.in(raster).at(5, 8).shouldBe(Color.BLACK); Pixel.in(raster).at(6, 7).shouldBe(Color.BLACK); }
@Test public void testPlotsShouldBeConnected() throws Exception { canvas.plot(new Point(2, 9)); canvas.plot(new Point(5, 6)); Raster raster = Bitmap.of(canvas); Pixels.in(raster).between(2, 9).and(5, 6).shouldBe( Color.BLACK); Pixel.in(raster).at(2, 9).shouldBe(Color.BLACK); Pixel.in(raster).at(3, 8).shouldBe(Color.BLACK); Pixel.in(raster).at(4, 7).shouldBe(Color.BLACK); Pixel.in(raster).at(5, 6).shouldBe(Color.BLACK); }