@Test
  void targetCanCreateCustomRequest() throws InterruptedException {
    server.enqueue(new MockResponse());

    String baseUrl = server.url("/default").toString();
    Target<TestQuery> custom =
        new HardCodedTarget<>(TestQuery.class, baseUrl) {

          @Override
          public Request apply(RequestTemplate input) {
            Request urlEncoded = super.apply(input);
            return Request.create(
                urlEncoded.httpMethod(),
                urlEncoded.url().replace("%2F", "/"),
                urlEncoded.headers(),
                urlEncoded.body(),
                urlEncoded.charset());
          }
        };

    Feign.builder().target(custom).get("slash/foo", "slash/bar");

    assertThat(server.takeRequest()).hasPath("/default/slash/foo?query=slash/bar");
  }
Per <a href="https://github.com/Netflix/feign/issues/227">#227</a>, some may want to opt out of
percent encoding. Here's how.
core/src/test/java/feign/TargetTest.java