A system for testing programs using a digital processor and programs in
computer memory. A mock behavior generator identifies an interface
indicated for mock behavior. The interface is identified as an input
parameter of a parameterized unit test. The mock behavior generator
creates a symbolic object with stubs to receive calls and mock behavior
that returns symbolic values upon receiving a call to the stub. A
symbolic executor, symbolically executes the parameterized unit test to
obtain path constraints for an implementation under test, and at least
one path constraint includes the symbol returned in response to the call
to the stub. A constraint solver provides solutions for the paths
including concrete values assigned to returned symbols. The mock behavior
generator creates mock objects that return the concrete values when the
implementation under test is executed.