@Test
  void decodeVoid() throws Exception {
    Decoder mockDecoder = mock(Decoder.class);
    server.enqueue(new MockResponse().setResponseCode(200).setBody("OK"));

    TestInterface api =
        new TestInterfaceBuilder()
            .decodeVoid()
            .decoder(mockDecoder)
            .target("http://localhost:" + server.getPort());

    api.body(emptyList());
    verify(mockDecoder, times(1)).decode(ArgumentMatchers.any(), eq(void.class));
  }
when you must parse a 2xx status to determine if the operation succeeded or not.
core/src/test/java/feign/FeignTest.java