EPSCanvasProvider extends AbstractCanvasProvider { @Override public void deviceFillRect(double x, double y, double w, double h) { if (firstError != null) { return; } try { writer.write(formatmm(x, y) + " " + formatmm(w) + " " + formatmm(h) + " rf\n"); } catch (IOException ioe) { firstError = ioe; } } 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 testDeviceFillRect() throws Exception { System.out.println("deviceFillRect"); double x = 0.0; double y = 0.0; double w = 10.0; double h = 10.0; EPSCanvasProvider instance = new EPSCanvasProvider(out, orientation); instance.deviceFillRect(x, y, w, h); instance.finish(); String result = ((ByteArrayOutputStream) out).toString("US-ASCII"); assertThat(result, startsWith("0 0 28.35 28.35 rf")); }