Update of tests, added mock function, include only specs in tests