@Test public void testClone() throws Throwable { byte[] header = new byte[0]; BaseHeader baseHeader = new BaseHeader(header); byte[] header2 = new byte[1]; baseHeader.unpack(header2); BaseHeader result = (BaseHeader) baseHeader.clone(); assertEquals(1, result.getLength(), "result.getLength()"); assertTrue(Arrays.equals(header2, baseHeader.header), "baseHeader.header"); }
public Object clone() { try { BaseHeader h = (BaseHeader) super.clone(); if (this.header != null) h.header = this.header.clone(); return h; } catch (CloneNotSupportedException e) { throw new InternalError(); } }
BaseHeader implements ISOHeader, Loggeable { public Object clone() { try { BaseHeader h = (BaseHeader) super.clone(); if (this.header != null) h.header = this.header.clone(); return h; } catch (CloneNotSupportedException e) { throw new InternalError(); } } }
BaseHeader implements ISOHeader, Loggeable { public Object clone() { try { BaseHeader h = (BaseHeader) super.clone(); if (this.header != null) h.header = this.header.clone(); return h; } catch (CloneNotSupportedException e) { throw new InternalError(); } } BaseHeader();  BaseHeader(byte[] header); }
BaseHeader implements ISOHeader, Loggeable { public Object clone() { try { BaseHeader h = (BaseHeader) super.clone(); if (this.header != null) h.header = this.header.clone(); return h; } catch (CloneNotSupportedException e) { throw new InternalError(); } } 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(); }
BaseHeader implements ISOHeader, Loggeable { public Object clone() { try { BaseHeader h = (BaseHeader) super.clone(); if (this.header != null) h.header = this.header.clone(); return h; } catch (CloneNotSupportedException e) { throw new InternalError(); } } 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();  }