@Test public void testFilter5() throws Throwable { MacroFilter macroFilter = new MacroFilter(); LogEvent evt = new LogEvent(); ISOChannel channel = new NACChannel(); when(m.getMaxField()).thenReturn(0); when(m.hasField(0)).thenReturn(true); when(m.getValue(0)).thenReturn("N/A in Composite"); ISOMsg result = macroFilter.filter(channel, m, evt); assertSame(m, result, "result"); }
public ISOMsg filter (ISOChannel channel, ISOMsg m, LogEvent evt) throws VetoException { try { applyProps (m); if (validFields.length > 0) m = m.clone (validFields); if (unsetFields.length > 0) m.unset (unsetFields); } catch (ISOException e) { evt.addMessage (e); throw new VetoException (e); } return m; }
MacroFilter implements ISOFilter, Configurable { public ISOMsg filter (ISOChannel channel, ISOMsg m, LogEvent evt) throws VetoException { try { applyProps (m); if (validFields.length > 0) m = m.clone (validFields); if (unsetFields.length > 0) m.unset (unsetFields); } catch (ISOException e) { evt.addMessage (e); throw new VetoException (e); } return m; } }
MacroFilter implements ISOFilter, Configurable { public ISOMsg filter (ISOChannel channel, ISOMsg m, LogEvent evt) throws VetoException { try { applyProps (m); if (validFields.length > 0) m = m.clone (validFields); if (unsetFields.length > 0) m.unset (unsetFields); } catch (ISOException e) { evt.addMessage (e); throw new VetoException (e); } return m; } MacroFilter(); }
MacroFilter implements ISOFilter, Configurable { public ISOMsg filter (ISOChannel channel, ISOMsg m, LogEvent evt) throws VetoException { try { applyProps (m); if (validFields.length > 0) m = m.clone (validFields); if (unsetFields.length > 0) m.unset (unsetFields); } catch (ISOException e) { evt.addMessage (e); throw new VetoException (e); } return m; } MacroFilter(); void setConfiguration(Configuration cfg); ISOMsg filter(ISOChannel channel, ISOMsg m, LogEvent evt); }
MacroFilter implements ISOFilter, Configurable { public ISOMsg filter (ISOChannel channel, ISOMsg m, LogEvent evt) throws VetoException { try { applyProps (m); if (validFields.length > 0) m = m.clone (validFields); if (unsetFields.length > 0) m.unset (unsetFields); } catch (ISOException e) { evt.addMessage (e); throw new VetoException (e); } return m; } MacroFilter(); void setConfiguration(Configuration cfg); ISOMsg filter(ISOChannel channel, ISOMsg m, LogEvent evt);  }