@@ -0,0 +1,1485 @@
+/*%0A * jPOS Project %5Bhttp://jpos.org%5D%0A * Copyright (C) 2000-2020 jPOS Software SRL%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as%0A * published by the Free Software Foundation, either version 3 of the%0A * License, or (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0A%0Apackage org.jpos.tlv.packager.bertlv;%0A%0Aimport org.jpos.emv.EMVStandardTagType;%0Aimport org.jpos.iso.*;%0Aimport org.jpos.tlv.ISOTaggedField;%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport static org.junit.jupiter.api.Assertions.*;%0A%0Apublic class BERTLVPackagerTest %7B%0A%0A    @Test%0A    public void testZeroLength() throws ISOException %7B%0A        BERTLVPackager p = new BERTLVAsciiHexPackager();%0A        ISOTaggedField t = new ISOTaggedField(EMVStandardTagType.AMOUNT_AUTHORISED_NUMERIC_0x9F02.getTagNumberHex(),%0A          new ISOField(0, %22%22));%0A        t.setFieldNumber(1);%0A%0A        ISOMsg m = new ISOMsg(55);%0A        m.set(t);%0A        byte%5B%5D b = p.pack(m, true, 1, 1);%0A        assertArrayEquals(b, ISOUtil.hex2byte(%22394630323030%22));%0A    %7D%0A%7D%0A

add BERTLVPackager testZeroLength