Simulating behaviors with mock objects

solved first problem using mock.