Simulating behaviors with mock objects