added a functional test for collapse as an example. resolves #124
Merge pull request #126 from tomwayson/issue-124

added a functional test for collapse as an example. resolves #124