Mocked out time and added a test case.