@Test public void testSetConfigurationThrowsNullPointerException() throws Throwable { DelayFilter delayFilter = new DelayFilter(100); Configuration cfg = new SubConfiguration(); try { delayFilter.setConfiguration(cfg); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot invoke \"org.jpos.core.Configuration.getInt(String)\" because \"this.cfg\" is null", ex.getMessage(), "ex.getMessage()"); } assertEquals(100, delayFilter.delay, "delayFilter.delay"); } }
public void setConfiguration (Configuration cfg) { delay = cfg.getInt ("delay"); }
DelayFilter implements ISOFilter, Configurable { public void setConfiguration (Configuration cfg) { delay = cfg.getInt ("delay"); } }
DelayFilter implements ISOFilter, Configurable { public void setConfiguration (Configuration cfg) { delay = cfg.getInt ("delay"); } DelayFilter();  DelayFilter(int delay); }
DelayFilter implements ISOFilter, Configurable { public void setConfiguration (Configuration cfg) { delay = cfg.getInt ("delay"); } DelayFilter();  DelayFilter(int delay); void setConfiguration(Configuration cfg); ISOMsg filter(ISOChannel channel, ISOMsg m, LogEvent evt); }
DelayFilter implements ISOFilter, Configurable { public void setConfiguration (Configuration cfg) { delay = cfg.getInt ("delay"); } DelayFilter();  DelayFilter(int delay); void setConfiguration(Configuration cfg); ISOMsg filter(ISOChannel channel, ISOMsg m, LogEvent evt);  }