package com.jgeppert.struts2.jquery.components;

import org.apache.struts2.conversion.StrutsTypeConverterHolder;
import org.junit.jupiter.api.BeforeEach;

import com.opensymphony.xwork2.DefaultTextProvider;
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
import com.opensymphony.xwork2.ognl.OgnlUtil;
import com.opensymphony.xwork2.ognl.OgnlValueStack;
import com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor;
import com.opensymphony.xwork2.util.ValueStack;

public abstract class AbstractComponentBaseTest {
    protected ValueStack valueStack;

    @BeforeEach
    void setUpValueStack() {
        valueStack = new TestOgnlValueStack();
    }

    static class TestOgnlValueStack extends OgnlValueStack {
        private static final long serialVersionUID = 1L;

        protected TestOgnlValueStack() {
            super(new TestXworkConverter(), new CompoundRootAccessor(), new DefaultTextProvider(), false);
            TestXworkConverter converter = new TestXworkConverter();
            converter.setTypeConverterHolder(new StrutsTypeConverterHolder());

            setXWorkConverter(converter);
            setOgnlUtil(new OgnlUtil(null, null));
        }

    }

    static class TestXworkConverter extends XWorkConverter {
    }
}

@@ -53,114 +53,8 @@
 ort 
-org.apache.struts2.conversion.StrutsTypeConverterHolder;%0Aimport org.junit.jupiter.api.BeforeEach;%0A%0Aimport 
 com.
@@ -155,16 +155,156 @@
 onverter
+;%0Aimport com.opensymphony.xwork2.ognl.DefaultOgnlBeanInfoCacheFactory;%0Aimport com.opensymphony.xwork2.ognl.DefaultOgnlExpressionCacheFactory
 ;%0Aimport
@@ -509,16 +509,121 @@
 ueStack;
+%0Aimport org.apache.struts2.conversion.StrutsTypeConverterHolder;%0Aimport org.junit.jupiter.api.BeforeEach;
 %0A%0Apublic
@@ -1303,17 +1303,89 @@
 il(n
-ull, null
+ew DefaultOgnlExpressionCacheFactory%3C%3E(), new DefaultOgnlBeanInfoCacheFactory%3C%3E()
 ));%0A

Set default cache factories for ognl utils in integration tests