Right now, this just duplicates the implementation (more or less) - it should be a proper integration test