use mocking rather than date maths in tests