Adjusted to use mock for number state tests.