write integration tests