Add integration tests and make sure it actually works