private MockResponse buildMockResponseWithLocationHeader(String redirectPath) {
    return new MockResponse()
        .setResponseCode(302)
        .addHeader("location", "http://localhost:" + server.getPort() + redirectPath);
  }
The type of a parameter value may not be the desired type to encode as. Prefer the interface
type.
hc5/src/test/java/feign/hc5/AsyncApacheHttp5ClientTest.java