use of org.jpos.iso.IFA_LLBNUM in project jPOS by jpos.
the class CTCSubElementPackagerTest method testUnpackThrowsNegativeArraySizeException.
@Test
public void testUnpackThrowsNegativeArraySizeException() throws Throwable {
byte[] b = new byte[3];
ISOFieldPackager[] fld = new ISOFieldPackager[3];
fld[0] = new IFA_LLBNUM();
CTCSubElementPackager cTCSubElementPackager = new CTCSubElementPackager();
cTCSubElementPackager.setFieldPackager(fld);
try {
cTCSubElementPackager.unpack(new ISOBinaryField(), b);
fail("Expected NegativeArraySizeException to be thrown");
} catch (NegativeArraySizeException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
Aggregations