Integration tests

See also #12 (that was closed accidentally).