added sortbydate test case