### Question:
NCCChannel extends BaseChannel { public void setHeader (String header) { super.setHeader (ISOUtil.str2bcd(header, false)); } NCCChannel();  NCCChannel(String host, int port, ISOPackager p, byte[] TPDU);  NCCChannel(ISOPackager p, byte[] TPDU);  NCCChannel(ISOPackager p, byte[] TPDU, ServerSocket serverSocket); void setHeader(String header); void setConfiguration(Configuration cfg);  }### Answer:
@Test public void testSetHeader() throws Throwable { byte[] TPDU = new byte[1]; NCCChannel nCCChannel = new NCCChannel("testNCCChannelHost", 100, new ISO93BPackager(), TPDU); nCCChannel.setHeader("testNCCChannelHeader"); assertEquals(10, nCCChannel.getHeader().length, "nCCChannel.getHeader().length"); }
@Test public void testSetHeaderThrowsNullPointerException() throws Throwable { byte[] TPDU = new byte[1]; NCCChannel nCCChannel = new NCCChannel(new ISO87BPackager(), TPDU, new ServerSocket()); try { nCCChannel.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(TPDU, nCCChannel.getHeader(), "nCCChannel.getHeader()"); } }