fix tests, add pretty print for integration tests