Made small code refactorings and added the `setRequestMock` method