### Question:
DebugBorder implements Border { public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { b.paintBorder(c, g, x, y, width, height); Insets insets = b.getBorderInsets(c); Color layerColor = new Color(0.0f, 1.0f, 0.0f, 0.35f); g.setColor(layerColor); g.fillRect(x, y, width, insets.top); g.fillRect(x, y + insets.top, insets.left, height - insets.bottom - insets.top); g.fillRect(x, y + height - insets.bottom, width, insets.bottom); g.fillRect(x + width - insets.right, y + insets.top, insets.right, height - insets.bottom - insets.top); } DebugBorder(Border b); void paintBorder(Component c, Graphics g, int x, int y, int width, int height); Insets getBorderInsets(Component c); boolean isBorderOpaque(); Border getDelegate();  }### Answer:
@Test public void testPaintBorder() { Graphics g = mockHelper.createMock(Graphics.class); int x = 0; int y = 0; int width = 10; int height = 10; mockBorder.paintBorder(mockComponent, g, x, y, width, height); expect(mockBorder.getBorderInsets(mockComponent)).andStubReturn(insets); g.setColor(isA(Color.class)); g.fillRect(anyInt(), anyInt(), anyInt(), anyInt()); expectLastCall().anyTimes(); mockHelper.replayAll(); classUnderTest.paintBorder(mockComponent, g, x, y, width, height); mockHelper.verifyAll(); }