A Groovy class to generate CSV output (with tests)