### Question:
BaseHeader implements ISOHeader, Loggeable { public int unpack (byte[] header) { if (header != null) { this.header = header.clone(); return header.length; } else { this.header = null; } return 0; } BaseHeader();  BaseHeader(byte[] header); Object clone(); byte[] pack(); int unpack(byte[] header); int getLength(); void setDestination(String dst); void setSource(String src); String getDestination(); String getSource(); void swapDirection(); void dump(PrintStream p, String indent); void setAsciiEncoding(boolean asciiEncoding); boolean isAsciiEncoding();  }### Answer:
@Test public void testUnpack() throws Throwable { byte[] header = new byte[0]; BaseHeader baseHeader = new BaseHeader(header); int result = baseHeader.unpack(null); assertNull(baseHeader.header, "baseHeader.header"); assertEquals(0, result, "result"); }
@Test public void testUnpack1() throws Throwable { byte[] header = new byte[0]; BaseHeader baseHeader = new BaseHeader(header); byte[] header2 = new byte[1]; int result = baseHeader.unpack(header2); assertTrue(Arrays.equals(header2, baseHeader.header), "baseHeader.header"); assertEquals((byte) 0, baseHeader.header[0], "baseHeader.header[0]"); assertEquals(1, result, "result"); }