Integration tests. Fixes #12.