wrote integration test but it has errors