@Test
public void testWriteHeader() throws Throwable {
final ISOMsg m = mock(ISOMsg.class);
final ISOVError isov = mock(ISOVError.class);
ISOMsg iSOVMsg = new ISOVMsg(m, isov);
final BASE1Header header = mock(BASE1Header.class);
iSOVMsg.setHeader(header);
final ObjectOutputStream out = mock(ObjectOutputStream.class);
final byte[] bytes = new byte[1];
bytes[0] = (byte) 0;
given(header.getLength()).willReturn(1);
given(header.pack()).willReturn(bytes);
iSOVMsg.writeHeader(out);
assertSame("(ISOVMsg) iSOVMsg.header", header, ((ISOVMsg) iSOVMsg).header);
verify(out).write(bytes);
verify(out).writeByte(72);