### Question:
WmsMapElementGraphics2DHandler implements
    GenericElementGraphics2DHandler { @Override public void exportElement(JRGraphics2DExporterContext context, JRGenericPrintElement element, Graphics2D grx, Offset offset) { try { JRGraphics2DExporter exporter = (JRGraphics2DExporter) context .getExporter(); ImageDrawer imageDrawer = exporter.getFrameDrawer().getDrawVisitor() .getImageDrawer(); JRPrintImage image = getImage(context.getJasperReportsContext(), element); imageDrawer.draw(grx, image, offset.getX(), offset.getY()); } catch (Exception e) { throw new RuntimeException(e); } }  static WmsMapElementGraphics2DHandler getInstance(); @Override void exportElement(JRGraphics2DExporterContext context,
      JRGenericPrintElement element, Graphics2D grx, Offset offset); @Override boolean toExport(JRGenericPrintElement element);  }### Answer:
@Ignore @Test public void testExportElement() throws JRException { JRGraphics2DExporter exporter = new JRGraphics2DExporter(); JRGraphics2DExporterContext context = mock(JRGraphics2DExporterContext.class); when(context.getExporter()).thenReturn(exporter); JRGenericPrintElement element = mock(JRGenericPrintElement.class); java.awt.Container container = new Container(); Graphics2D graphics = (Graphics2D) container.getGraphics(); Offset offset = new Offset(0, 0); handler.exportElement(context, element, graphics, offset); }