### Question:
ShapeDrawer { public void draw(Canvas graphics) { graphics.setColor(stroke); graphics.setStrokeWidth(new Width(4)); graphics.draw(shape); } ShapeDrawer(AgnosticShape shape, RGBColor stroke); void draw(Canvas graphics);  }### Answer:
@Test public void drawsPolygonOutline() throws Exception { Canvas graphics = mock(Canvas.class); Polygon polygon = new Polygon(); new ShapeDrawer(polygon, stroke).draw(graphics); InOrder inOrder = inOrder(graphics); inOrder.verify(graphics).setColor(RGBColor.Pink); inOrder.verify(graphics).setStrokeWidth(new Width(4)); inOrder.verify(graphics).draw(polygon); }