@Test public void testSetHeaderThrowsNullPointerException() throws Throwable { byte[] TPDU = new byte[0]; byte[] TPDU2 = new byte[1]; NACChannel nACChannel = new NACChannel(new ISO93APackager(), TPDU2, new ServerSocket()); new NACChannel(new ISO93BPackager(), TPDU).addFilter(new DelayFilter(), 100); try { nACChannel.setHeader((String) null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot invoke \"String.length()\" because \"s\" is null", ex.getMessage(), "ex.getMessage()"); } assertSame(TPDU2, nACChannel.getHeader(), "nACChannel.getHeader()"); } }
public void setHeader (String header) { super.setHeader (ISOUtil.str2bcd(header, false)); }
NACChannel extends BaseChannel { public void setHeader (String header) { super.setHeader (ISOUtil.str2bcd(header, false)); } }
NACChannel extends BaseChannel { public void setHeader (String header) { super.setHeader (ISOUtil.str2bcd(header, false)); } NACChannel();  NACChannel(String host, int port, ISOPackager p, byte[] TPDU);  NACChannel(ISOPackager p, byte[] TPDU);  NACChannel(ISOPackager p, byte[] TPDU, ServerSocket serverSocket); }
NACChannel extends BaseChannel { public void setHeader (String header) { super.setHeader (ISOUtil.str2bcd(header, false)); } NACChannel();  NACChannel(String host, int port, ISOPackager p, byte[] TPDU);  NACChannel(ISOPackager p, byte[] TPDU);  NACChannel(ISOPackager p, byte[] TPDU, ServerSocket serverSocket); void setHeader(String header); void setConfiguration(Configuration cfg); }
NACChannel extends BaseChannel { public void setHeader (String header) { super.setHeader (ISOUtil.str2bcd(header, false)); } NACChannel();  NACChannel(String host, int port, ISOPackager p, byte[] TPDU);  NACChannel(ISOPackager p, byte[] TPDU);  NACChannel(ISOPackager p, byte[] TPDU, ServerSocket serverSocket); void setHeader(String header); void setConfiguration(Configuration cfg);  }