@Test
  void okIfEncodeRootCauseHasNoMessage() throws Exception {
    server.enqueue(new MockResponse().setBody("success!"));

    TestInterface api =
        new TestInterfaceBuilder()
            .encoder(
                (object, bodyType, template) -> {
                  throw new RuntimeException();
                })
            .target("http://localhost:" + server.getPort());

    assertThrows(EncodeException.class, () -> api.body(Arrays.asList("foo")));
  }
The type of a parameter value may not be the desired type to encode as. Prefer the interface
type.
core/src/test/java/feign/FeignUnderAsyncTest.java