tests with mock