use of org.jpos.iso.IFA_BINARY in project jPOS by jpos.
the class ISOMsgFieldValidatingPackagerTest method testValidateWithNonISOMsgThrowsNullPointerException.
@Test
public void testValidateWithNonISOMsgThrowsNullPointerException() throws Throwable {
try {
new ISOMsgFieldValidatingPackager(new IFA_BINARY(100, "testISOMsgFieldValidatingPackagerDescription"), new ISOBaseValidatingPackager()).validate(new ISOField(100));
fail("Expected ClassCastException to be thrown");
} catch (NullPointerException ex) {
assertEquals("ex.getClass()", NullPointerException.class, ex.getClass());
}
}
Aggregations