Refactored tests to use supertest