Added test_with_mock.