Fixed creation of mock in tests for methods that are necessary.