Integration test. Fixes #18