AbstractBarcodeBean implements BarcodeGenerator { public double getHumanReadableHeight() { if (getMsgPosition() == HumanReadablePlacement.HRP_NONE) { return 0.0; } else { final double textHeight = this.fontSize; if (hasFontDescender()) { return 1.3 * textHeight; } else { return textHeight; } } }  String getPattern(); void setPattern(String v); double getHumanReadableHeight(); double getBarHeight(); double getHeight(); void setBarHeight(double height); void setHeight(double height); double getModuleWidth(); void setModuleWidth(double width); abstract double getBarWidth(int width); boolean hasQuietZone(); void doQuietZone(boolean value); double getQuietZone(); double getVerticalQuietZone(); void setQuietZone(double width); void setVerticalQuietZone(double height); HumanReadablePlacement getMsgPosition(); void setMsgPosition(HumanReadablePlacement placement); double getFontSize(); void setFontSize(double size); String getFontName(); void setFontName(String name); @Override abstract void generateBarcode(CanvasProvider canvas, String msg); @Override BarcodeDimension calcDimensions(String msg); @Override void configure(Configuration cfg);  }
@Test public void testGetHumanReadableHeight() { System.out.println("getHumanReadableHeight"); AbstractBarcodeBean instance = new AbstractBarcodeBeanImpl(); double expResult = 0.0; instance.setMsgPosition(HumanReadablePlacement.HRP_NONE); double result = instance.getHumanReadableHeight(); assertEquals(expResult, result, 0.0); instance.setMsgPosition(HumanReadablePlacement.HRP_BOTTOM); result = instance.getHumanReadableHeight(); assertEquals(3.67, result, 0.01); }