### Question:
X25Channel extends BaseChannel { protected int getHeaderLength() { return header != null ? header.length : 0; } X25Channel();  X25Channel(String host, int port, ISOPackager p);  X25Channel(ISOPackager p);  X25Channel(ISOPackager p, ServerSocket serverSocket); void disconnect(); void setHeader(byte[] header); void setHeader(String header); byte[] getHeader();  }### Answer:
@Test public void testGetHeaderLength() throws Throwable { byte[] header = new byte[1]; X25Channel x25Channel = new X25Channel("testX25ChannelHost", 100, null); x25Channel.setHeader(header); int result = x25Channel.getHeaderLength(); assertEquals(1, result, "result"); }
@Test public void testGetHeaderLength1() throws Throwable { X25Channel x25Channel = new X25Channel(); int result = x25Channel.getHeaderLength(); assertEquals(0, result, "result"); }