Adds integration tests.
Merge pull request #4 from nightraven/integrationtests

Adds integration tests.