Add next date test code

test code with implementation