ObjectIONotSerializableException,
ObjectIODataRecordNotFoundException,
ObjectIOClassNotFoundException, ObjectIODataCorruptedException,
HeapException, BinaryConverterException,
ObjectIOTooBigForSerializationException {
final WithIntegerField withIntegerField = new WithIntegerField();
withIntegerField.setIntegerField(Integer.valueOf(0));
final ObjectAndPersistInfo objectAndItsClassInfo = createObjectAndItsPersistInfo(withIntegerField);
/* initial write */
WriteResult writeResult = write(objectAndItsClassInfo);
assertValueChangeForFirstWrite(writeResult);
assertNoSonReferenced(writeResult);
assertNoReferenceChange(writeResult);
assertWroteType(writeResult, HelperBinaryConversion.INTEGER_TYPE);
/* second write state not change */
writeResult = write(objectAndItsClassInfo);
assertValueNotChangeForSameStateWrite(writeResult);
assertNoSonReferenced(writeResult);
assertNoReferenceChange(writeResult);
/* third write state change */
withIntegerField.setIntegerField(Integer.valueOf(1));
writeResult = write(objectAndItsClassInfo);
assertValueChangeSinceStateChange(writeResult);
assertNoSonReferenced(writeResult);
assertNoReferenceChange(writeResult);
}