### Question:
ISOField extends ISOComponent implements Cloneable, Externalizable { @Override public byte[] getBytes() { return value != null ? value.getBytes(ISOUtil.CHARSET) : new byte[] {}; } ISOField();  ISOField(int n);  ISOField(int n, String v); @Override byte[] pack(); @Override int unpack(byte[] b); @Override void unpack(InputStream in); @Override Object getKey(); @Override Object getValue(); @Override void setValue(Object obj); @Override byte[] getBytes(); @Override void dump(PrintStream p, String indent); @Override void setFieldNumber(int fieldNumber); @Override int getFieldNumber(); @Override void writeExternal(ObjectOutput out); @Override void readExternal(ObjectInput in);  }### Answer:
@Test public void testGetBytes() throws Throwable { ISOField iSOField = new ISOField(100); iSOField.setValue(""); byte[] result = iSOField.getBytes(); assertEquals(0, result.length, "result.length"); }
@Test public void testGetBytes1() throws Throwable { byte[] result = new ISOField(100, "testISOFieldv").getBytes(); assertEquals(13, result.length, "result.length"); assertEquals((byte) 116, result[0], "result[0]"); }
@Test public void testGetBytesThrowsNullPointerException() throws Throwable { byte[] bytes = new ISOField(100).getBytes(); assertArrayEquals(new byte[0], bytes); }