Added tests for generate_datetime method.