### Question:
BERTLVPackager extends GenericPackager { @Override public int unpack(ISOComponent m, byte[] b) throws ISOException { try { return unpack(m, b, false); } catch (RuntimeException e) { throw new ISOException(e); } } BERTLVPackager(); @Override byte[] pack(ISOComponent m); byte[] pack(ISOComponent m, boolean nested, int startIdx, int endIdx); @Override int unpack(ISOComponent m, byte[] b); int unpack(ISOComponent m, byte[] b, boolean nested); @Override void unpack(ISOComponent m, InputStream in);  }### Answer:
@Test public void testUnpackingZeroLength() { try { BERTLVPackager p = new BERTLVBinaryPackager(); p.setFieldPackager(new ISOFieldPackager[]{new IFA_TTLLBINARY()}); ISOMsg m = new ISOMsg(55); p.unpack(m, ISOUtil.hex2byte("9F3400")); } catch (ISOException e) { fail("Unexpected java.lang.ArithmeticException: divide by zero", e); } }
@Test public void testUnpackingDate() { try { BERTLVPackager p = new BERTLVBinaryPackager(); p.setFieldPackager(new ISOFieldPackager[]{new IFA_TTLLBINARY()}); ISOMsg m = new ISOMsg(55); p.unpack(m, ISOUtil.hex2byte("9A03020618")); assertEquals("020618", m.getComponent("1").getValue()); } catch (ISOException e) { fail("Unexpected exception", e); } }