Refactors url command to use httptest