write integration test