@Test
  void encodeThrowsExceptionWhenMarshallingFailsWithSetSchema() throws Exception {
    JAXBContextFactory jaxbContextFactory =
        new JAXBContextFactory.Builder().withMarshallerSchema(getMockIntObjSchema()).build();

    Encoder encoder = new JAXBEncoder(jaxbContextFactory);

    RequestTemplate template = new RequestTemplate();
    EncodeException exception =
        assertThrows(
            EncodeException.class,
            () -> encoder.encode(new MockIntObject(), MockIntObject.class, template));
    assertThat(exception)
        .hasCauseInstanceOf(MarshalException.class)
        .hasMessageContaining("The content of element 'mockIntObject' is not complete.");
  }
Enabled via {@link feign.Feign.Builder#dismiss404()}
jaxb-jakarta/src/test/java/feign/jaxb/JAXBCodecTest.java