### Question:
Canvas { public Canvas(int width, int height) { this.buffer = new char[width * height]; this.width = width; clear(); } Canvas(int width, int height); Canvas clear(); Canvas clear(char c); Canvas box(int x, int y, int w, int h); Canvas box(int x, int y, int w, int h, Style style); Canvas line(int x1, int y1, int x2, int y2, int what); Canvas line(int x1, int y1, int x2, int y2, char what); Canvas merge(int x, int y, int what); Canvas merge(int x, int y, char what); char set(int x, int y, char what); char get(int x, int y); int width(); int height(); @Override String toString(); void toString(StringBuilder sb); Canvas box(); Canvas box(Style style); Canvas merge(Canvas secondary, int dx, int dy); void set(int x, int y, String message);  }### Answer:
@Test public void testCanvas() { Canvas c = new Canvas(10, 10); c.box(0, 0, 10, 10); assertEquals( "" + "┌────────┐\n" + "│ │\n" + "│ │\n" + "│ │\n" + "│ │\n" + "│ │\n" + "│ │\n" + "│ │\n" + "│ │\n" + "└────────┘\n" + "", c.toString()); c.box(2, 2, 6, 6); assertEquals("" + "┌────────┐\n" + "│ │\n" + "│ ┌────┐ │\n" + "│ │ │ │\n" + "│ │ │ │\n" + "│ │ │ │\n" + "│ │ │ │\n" + "│ └────┘ │\n" + "│ │\n" + "└────────┘\n" + "", c.toString()); c.box(0, 0, 6, 6); assertEquals("" + "┌────┬───┐\n" + "│ │ │\n" + "│ ┌──┼─┐ │\n" + "│ │ │ │ │\n" + "│ │ │ │ │\n" + "├─┼──┘ │ │\n" + "│ │ │ │\n" + "│ └────┘ │\n" + "│ │\n" + "└────────┘\n" + "", c.toString()); c.box(6, 6, 4, 4); assertEquals("" + "┌────┬───┐\n" + "│ │ │\n" + "│ ┌──┼─┐ │\n" + "│ │ │ │ │\n" + "│ │ │ │ │\n" + "├─┼──┘ │ │\n" + "│ │ ┌┼─┤\n" + "│ └───┼┘ │\n" + "│ │ │\n" + "└─────┴──┘\n" + "", c.toString()); }