Tech Debt: Rewrite the getMockForRequest function