made mock method work and added mock test