Working Karma Tests with mocking