Search in sources :

Example 1 with X92GenericPackager

use of org.jpos.iso.packager.X92GenericPackager in project jPOS by jpos.

the class MacroFilterTest method testFilter.

@Test
public void testFilter() throws Throwable {
    MacroFilter macroFilter = new MacroFilter();
    ISOChannel channel = new GZIPChannel(new X92GenericPackager());
    LogEvent evt = new LogEvent("testMacroFilterTag", "\u0000\u0000");
    when(m.getMaxField()).thenReturn(0);
    ISOMsg result = macroFilter.filter(channel, m, evt);
    assertSame("result", m, result);
    verify(m).hasField(0);
}
Also used : ISOMsg(org.jpos.iso.ISOMsg) LogEvent(org.jpos.util.LogEvent) ISOChannel(org.jpos.iso.ISOChannel) GZIPChannel(org.jpos.iso.channel.GZIPChannel) X92GenericPackager(org.jpos.iso.packager.X92GenericPackager) Test(org.junit.Test)

Aggregations

ISOChannel (org.jpos.iso.ISOChannel)1 ISOMsg (org.jpos.iso.ISOMsg)1 GZIPChannel (org.jpos.iso.channel.GZIPChannel)1 X92GenericPackager (org.jpos.iso.packager.X92GenericPackager)1 LogEvent (org.jpos.util.LogEvent)1 Test (org.junit.Test)1