A class for creating MockHttpServletRequests instances would be helpful. There are many places where we cannot use MockMvcRequestBuilders or similar since they aren't testing MVC scenarios.

Related to #17449