public static void bindEnvironment(ScriptEngine engine, String requestContent, Map<String, Object> requestContext,
         StateStore stateStore) {
      // Build a map of header values.
      bindEnvironment(engine, requestContent, requestContext, stateStore, null);
   }
@Test
   void testMicrocksXmlHolder() {
      String body = """
            <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
                <soapenv:Header/>
                <soapenv:Body>
                   <hel:sayHello xmlns:hel="http://www.example.com/hello">
                      <name>Andrew</name>
                   </hel:sayHello>
                </soapenv:Body>
             </soapenv:Envelope>
            """;

      String script = """
            import io.github.microcks.util.soapui.XmlHolder
            def holder = new XmlHolder( mockRequest.requestContent )
            def name = holder["//name"]

            if (name == "Andrew"){
                return "Andrew Response"
            } else if (name == "Karla"){
                return "Karla Response"
            } else {
                return "World Response"
            }
            """;

      ScriptEngineManager sem = new ScriptEngineManager();
      Map<String, Object> context = new HashMap<>();

      try {
         // Evaluating request with script coming from operation dispatcher rules.
         ScriptEngine se = sem.getEngineByExtension("groovy");
         ScriptEngineBinder.bindEnvironment(se, body, context, null);
         String result = (String) se.eval(script);

         assertEquals("Andrew Response", result);
      } catch (Exception e) {
         fail("Exception should no be thrown");
      }
   }