using mock instead of stub