@Test
  void callIgnoredMethod() throws Exception {
    TestInterface api = new TestInterfaceBuilder().target("http://localhost:" + server.getPort());

    try {
      api.ignore();
      fail("No exception thrown");
    } catch (Exception e) {
      assertThat(e.getClass()).isEqualTo(UnsupportedOperationException.class);
      assertThat(e.getMessage()).isEqualTo("Method \"ignore\" should not be called");
    }
  }
when you must parse a 2xx status to determine if the operation succeeded or not.
core/src/test/java/feign/FeignTest.java