Search in sources :

Example 11 with BASE24TCPChannel

use of org.jpos.iso.channel.BASE24TCPChannel in project jPOS by jpos.

the class StatefulFilterTest method testFilterThrowsNullPointerException2.

@Test
public void testFilterThrowsNullPointerException2() throws Throwable {
    int[] key = new int[1];
    StatefulFilter statefulFilter = new StatefulFilter();
    statefulFilter.setKey(key);
    try {
        statefulFilter.filter(new BASE24TCPChannel(new GenericValidatingPackager()), null, new LogEvent());
        fail("Expected NullPointerException to be thrown");
    } catch (NullPointerException ex) {
        assertNull("ex.getMessage()", ex.getMessage());
    }
}
Also used : BASE24TCPChannel(org.jpos.iso.channel.BASE24TCPChannel) GenericValidatingPackager(org.jpos.iso.packager.GenericValidatingPackager) LogEvent(org.jpos.util.LogEvent) Test(org.junit.Test)

Aggregations

BASE24TCPChannel (org.jpos.iso.channel.BASE24TCPChannel)11 Test (org.junit.Test)11 LogEvent (org.jpos.util.LogEvent)8 ISOMsg (org.jpos.iso.ISOMsg)6 SimpleConfiguration (org.jpos.core.SimpleConfiguration)2 ISOFilter (org.jpos.iso.ISOFilter)2 PostPackager (org.jpos.iso.packager.PostPackager)2 PADChannel (org.jpos.iso.channel.PADChannel)1 DelayFilter (org.jpos.iso.filter.DelayFilter)1 StatefulFilter (org.jpos.iso.filter.StatefulFilter)1 Base1SubFieldPackager (org.jpos.iso.packager.Base1SubFieldPackager)1 EuroSubFieldPackager (org.jpos.iso.packager.EuroSubFieldPackager)1 GenericValidatingPackager (org.jpos.iso.packager.GenericValidatingPackager)1