public void testDoDeepCopyOfISOBinaryFieldWhenFieldContentChanges() throws Exception {
byte[] originalFieldContent = new byte[] {0x12, 0x34, 0x56, 0x78, (byte) 0x9A, (byte) 0xBC, (byte) 0xDE, (byte) 0xF0};
byte[] newFieldContent = new byte[] {0x11, 0x33, 0x55, 0x77, (byte) 0x99, (byte) 0xBB, (byte) 0xDD, (byte) 0xFF};
ISOBinaryField fieldWhichWillBeModified = new ISOBinaryField(42, originalFieldContent);
ISOBinaryField fieldWhoseValueShouldNotChange = (ISOBinaryField) copier.doDeepCopy(fieldWhichWillBeModified);
fieldWhichWillBeModified.setValue(newFieldContent);
fieldWhichWillBeModified.setFieldNumber(41);
assertNotNull(fieldWhichWillBeModified);
assertNotNull(fieldWhoseValueShouldNotChange);
assertNotSame(fieldWhichWillBeModified, fieldWhoseValueShouldNotChange);
assertTrue(Arrays.equals(originalFieldContent, (byte[]) fieldWhoseValueShouldNotChange.getValue()));
assertTrue(Arrays.equals(newFieldContent, (byte[]) fieldWhichWillBeModified.getValue()));
ISOBinaryFieldEqualityTester.assertNotEquals(fieldWhichWillBeModified, fieldWhoseValueShouldNotChange);
}