Improved date check in test case.