Refactor and http mock with supertest