1. A computer implemented method for recording a state of an object in a computer program, the method comprising: generating a unit test identifying an object to be monitored, the object having a plurality of fields, each field having a value; executing the computer program including the generated unit test; recording the values of one or more fields of the identified object; generating assertions for the unit test from the recorded values of the one or more fields of the identified object; inserting the generated assertions into the unit test; and re-executing the computer program including the unit test having the generated assertions to verify the computer program based on the assertions.