Added test for flattening MetadataDto