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

Here's my initial take at a functional test.

@shurakai, let me know what you think, and/or add your own example for another module so we can compare.

Thanks!