Fix tests and move integration test into integration tests directory.