Buggy code:
public class FiscalDocumentPrintTest extends AdempiereTestCase { private static final CLogger log = CLogger . getCLogger ( FiscalDocumentPrintTest . class ) ; private static final int SERVER_PORT = 9911 ; private FiscalDocumentListener fiscalDocumentListener ; private FiscalPrinterListener fiscalPrinterListener ; private X_LAR_Fiscal_Printer_Type fiscalPrinterType ; private MFiscalPrinter fiscalPrinter ; private MPOS posModel ; private PosOrderModel posOrder ; private FiscalDocumentPrintTest . TCPServerTest serverTest ; private int m_AD_Org_ID = 11 ; private int m_C_DocType_ID = 135 ; private int m_M_PriceList_ID = 101 ; private int m_C_CashBook_ID = 101 ; private int m_M_Warehouse_ID = 103 ; private int m_C_BPartner_ID = 118 ; private int m_C_BankAccount_ID = 100 ; private int m_M_Product_ID = 123 ; @ Override protected void setUp ( ) throws Exception { } @ Override protected void tearDown ( ) throws Exception { } public void testPrintDocument ( ) throws Exception { } private static class TCPServerTest extends Thread { @ Override public void run ( ) { } } private void createTestData ( ) throws Exception { fiscalDocumentListener = EasyMock . createMock ( FiscalDocumentListener . class ) ; fiscalPrinterListener = EasyMock . createMock ( FiscalPrinterListener . class ) ; fiscalPrinterType = new X_LAR_Fiscal_Printer_Type ( getCtx ( ) , 0 , getTrxName ( ) ) ; fiscalPrinterType . setclazz ( "ar.com.ergio.print.fiscal.hasar.HasarPrinterP320F" ) ; fiscalPrinterType . setIsActive ( true ) ; fiscalPrinterType . setName ( "Test<seq2seq4repair_space>Printer<seq2seq4repair_space>Type" ) ; fiscalPrinterType . save ( ) ; fiscalPrinter = new MFiscalPrinter ( getCtx ( ) , 0 , getTrxName ( ) ) ; fiscalPrinter . setLAR_Fiscal_Printer_Type_ID ( fiscalPrinterType . getLAR_Fiscal_Printer_Type_ID ( ) ) ; fiscalPrinter . setName ( "Test<seq2seq4repair_space>Printer" ) ; fiscalPrinter . setHost ( "localhost" ) ; fiscalPrinter . setPort ( FiscalDocumentPrintTest . SERVER_PORT ) ; fiscalPrinter . setStatus ( "IDL" ) ; fiscalPrinter . save ( ) ; posModel = new MPOS ( getCtx ( ) , 0 , getTrxName ( ) ) ; posModel . setName ( "Test<seq2seq4repair_space>POS" ) ; posModel . setC_DocType_ID ( m_C_DocType_ID ) ; posModel . setSalesRep_ID ( getAD_User_ID ( ) ) ; posModel . setM_PriceList_ID ( m_M_PriceList_ID ) ; posModel . setC_CashBook_ID ( m_C_CashBook_ID ) ; posModel . setM_Warehouse_ID ( m_M_Warehouse_ID ) ; posModel . setC_BankAccount_ID ( m_C_BankAccount_ID ) ; posModel . save ( ) ; MBPartner partner = new MBPartner ( getCtx ( ) , m_C_BPartner_ID , getTrxName ( ) ) ; if ( ( ( partner . getTaxID ( ) ) == null ) || ( partner . getTaxID ( ) . equals ( "" ) ) ) { partner . setTaxID ( "30-71135312-3" ) ; partner . save ( ) ; } MProduct product = new MProduct ( getCtx ( ) , m_M_Product_ID , getTrxName ( ) ) ; posOrder = PosOrderModel . createOrder ( posModel , partner , getTrxName ( ) ) ; <START_BUG> posOrder . createLine ( product , BigDecimal . valueOf ( 1 ) , BigDecimal . valueOf ( 100 ) ) ; <END_BUG> posOrder . payCash ( BigDecimal . valueOf ( 100 ) ) ; if ( posOrder . processOrder ( ) ) { commit ( ) ; } } private void deleteTestData ( ) throws Exception { } }

Fix:
posOrder . createLine ( product , BigDecimal . valueOf ( 1 ) , BigDecimal . valueOf ( 100 ) , 0 ) ;