Finish refactoring tests...
Refactor beforeRequest