EPSCanvasProvider extends AbstractCanvasProvider { public void finish() throws IOException { if (firstError != null) { throw firstError; } writer.write("%%EOF\n"); writer.flush(); } EPSCanvasProvider(OutputStream out, Orientation orientation); @Deprecated  EPSCanvasProvider(OutputStream out, int orientation); void finish(); @Override void establishDimensions(BarcodeDimension dim); @Override void deviceFillRect(double x, double y, double w, double h); @Override void deviceText(
            String text,
            double x1,
            double x2,
            double y1,
            String fontName,
            double fontSize,
            TextAlignment textAlign);  }
@Test public void testFinish() throws Exception { System.out.println("finish"); EPSCanvasProvider instance = new EPSCanvasProvider(out, orientation); instance.finish(); assertEquals("%%EOF\n", ((ByteArrayOutputStream) out).toString("US-ASCII")); }