DefaultCanvasLogicHandler implements ClassicBarcodeLogicHandler { protected double getStartX() { if (bcBean.hasQuietZone()) { return bcBean.getQuietZone(); } else { return 0.0; } } DefaultCanvasLogicHandler(AbstractBarcodeBean bcBean, Canvas canvas); @Override void startBarcode(String msg, String formattedMsg); @Override void startBarGroup(BarGroup type, String submsg); @Override void addBar(boolean black, int width); @Override void endBarGroup(); @Override void endBarcode();  }
@Test public void testGetStartX() { System.out.println("getStartX"); assertEquals(0.0, instance.getStartX(), 0.0); bean.setQuietZone(20); assertEquals(20.0, instance.getStartX(), 0.0); }