Learning to create mocks and stubs