Integration tests

This project can no longer live without integration tests.