Fixed condition error
Mocking during unit testing