2. The method of claim 1 , further comprising: modifying the unit test having the generated assertions; re-executing the computer program including the modified unit test having the generated assertions to generate new assertions; inserting the generated new assertions into the modified unit test; and re-executing the computer program including the modified unit test having the generated new assertions to verify the new assertions.
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.