AbstractBarcodeBean implements BarcodeGenerator { @Override public BarcodeDimension calcDimensions(String msg) { throw new UnsupportedOperationException("NYI"); }  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(expected = UnsupportedOperationException.class) public void testCalcDimensions() { System.out.println("calcDimensions"); String msg = ""; AbstractBarcodeBean instance = new AbstractBarcodeBeanImpl(); instance.calcDimensions(msg); }