@Test
  void changeSoapProtocolAndSetHeader() {
    Encoder encoder =
        new ChangedProtocolAndHeaderSOAPEncoder(new JAXBContextFactory.Builder().build());

    GetPrice mock = new GetPrice();
    mock.item = new Item();
    mock.item.value = "Apples";

    RequestTemplate template = new RequestTemplate();
    encoder.encode(mock, GetPrice.class, template);

    String soapEnvelop =
        "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
            + "<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">"
            + "<env:Header>"
            + (System.getProperty("java.version").startsWith("1.8")
                ? "<wss:Security xmlns:wss=\"http://schemas.xmlsoap.org/ws/2002/12/secext\">"
                : "<wss:Security xmlns=\"http://schemas.xmlsoap.org/ws/2002/12/secext\""
                    + " xmlns:wss=\"http://schemas.xmlsoap.org/ws/2002/12/secext\">")
            + "<wss:UsernameToken>"
            + "<wss:Username>test</wss:Username>"
            + "<wss:Password>test</wss:Password>"
            + "</wss:UsernameToken>"
            + "</wss:Security>"
            + "</env:Header>"
            + "<env:Body>"
            + "<GetPrice>"
            + "<Item>Apples</Item>"
            + "</GetPrice>"
            + "</env:Body>"
            + "</env:Envelope>";
    assertThat(template).hasBody(soapEnvelop);
  }
Enabled via {@link feign.Feign.Builder#dismiss404()}
soap-jakarta/src/test/java/feign/soap/SOAPCodecTest.java