Flattener unit test