Converting tests to Mock