在使用HttpRequest时向IHttpClientFactory注入状态是可以通过填充HttpRequestMessage.Properties实现的--参见 // GetDiscoveryDocumentAsync is a third party extension method on HttpClient<
为了对这个类进行单元测试,我试图在groovy测试用例中模拟这个httpClient.executeMethod(),但无法正确模拟它。httpclient = new HttpClient();
// the below关于如何从groovy对这个静态方法进行单元测试的任何想法。由于httpClient对象是类方法