Fixing mock constructor in tests.