private static async Task SetupExpectation(MockServerClient mockServerClient, bool secure) { await mockServerClient.ResetAsync(); await mockServerClient.When(Request() .WithSecure(secure) .WithMethod(HttpMethod.Get) .WithPath("/hello"), Times.Unlimited() ).RespondAsync(Response() .WithDelay(TimeSpan.FromSeconds(0)) .WithStatusCode(200) .WithBody("{\"message\": \"hello\"}")); }