Search in sources :

Example 1 with MacroFilter

use of org.jpos.iso.filter.MacroFilter in project jPOS by jpos.

the class BaseChannelTest method testApplyIncomingFiltersThrowsNullPointerException.

@Test
public void testApplyIncomingFiltersThrowsNullPointerException() throws Throwable {
    BaseChannel cSChannel = new CSChannel();
    cSChannel.addIncomingFilter(new MacroFilter());
    byte[] header = new byte[2];
    try {
        cSChannel.applyIncomingFilters(null, header, "testString".getBytes(), new LogEvent());
        fail("Expected NullPointerException to be thrown");
    } catch (NullPointerException ex) {
        assertNull("ex.getMessage()", ex.getMessage());
    }
}
Also used : LogEvent(org.jpos.util.LogEvent) CSChannel(org.jpos.iso.channel.CSChannel) MacroFilter(org.jpos.iso.filter.MacroFilter) Test(org.junit.Test)

Aggregations

CSChannel (org.jpos.iso.channel.CSChannel)1 MacroFilter (org.jpos.iso.filter.MacroFilter)1 LogEvent (org.jpos.util.LogEvent)1 Test (org.junit.Test)1