@Test
  void decodeThrowsExceptionWhenUnmarshallingFailsWithSetSchema() throws Exception {

    String mockXml =
        """
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?><mockIntObject>\
        <value>Test</value></mockIntObject>\
        """;

    Response response =
        Response.builder()
            .status(200)
            .reason("OK")
            .request(
                Request.create(HttpMethod.GET, "/api", Collections.emptyMap(), null, Util.UTF_8))
            .headers(Collections.emptyMap())
            .body(mockXml, UTF_8)
            .build();

    JAXBContextFactory factory =
        new JAXBContextFactory.Builder().withUnmarshallerSchema(getMockIntObjSchema()).build();
    DecodeException exception =
        assertThrows(
            DecodeException.class,
            () -> new JAXBDecoder(factory).decode(response, MockIntObject.class));
    assertThat(exception)
        .hasCauseInstanceOf(UnmarshalException.class)
        .hasMessageContaining("'Test' is not a valid value for 'integer'.");
  }
Enabled via {@link feign.Feign.Builder#dismiss404()}
jaxb/src/test/java/feign/jaxb/JAXBCodecTest.java