CodabarBean extends AbstractBarcodeBean { @Override public double getBarWidth(int width) { if (width == 1) { return moduleWidth; } else if (width == 2) { return moduleWidth * wideFactor; } else { throw new IllegalArgumentException("Only widths 1 and 2 allowed"); } } CodabarBean(); ChecksumMode getChecksumMode(); void setChecksumMode(ChecksumMode mode); double getWideFactor(); void setWideFactor(double value); @Override double getBarWidth(int width); boolean isDisplayStartStop(); void setDisplayStartStop(boolean value); @Override void generateBarcode(CanvasProvider canvas, String msg); @Override BarcodeDimension calcDimensions(String msg); @Override Collection<String> getAdditionalNames(); @Override String getId();  }
@Test public void testGetBarWidth() { System.out.println("getBarWidth"); int width = 1; CodabarBean instance = new CodabarBean(); double expResult = 0.20; double result = instance.getBarWidth(width); assertEquals(expResult, result, 0.01); }