}
public void testProcessFormThymeleafOrder() {
HttpServletRequest request = HDIVUtil.getHttpServletRequest();
IDataComposer dataComposer = this.dataComposerFactory.newInstance(request);
HDIVUtil.setDataComposer(dataComposer, request);
dataComposer.startPage();
String action = "/testAction.do";
// 1. the action url
String result = this.dataValueProcessor.processAction(request, action);
// Post urls are not modified
assertEquals(action, result);
// 2. Hidden field
Map<String, String> extraParams = this.dataValueProcessor.getExtraHiddenFields(request);
assertNotNull(extraParams);
assertTrue(extraParams.size() == 1);
String hdivStateParam = (String) request.getSession().getAttribute(Constants.HDIV_PARAMETER);
String stateValue = extraParams.get(hdivStateParam);
assertNotNull(stateValue);
// 3. form parameters
String val = this.dataValueProcessor.processFormFieldValue(request, "param", "value", "select");
assertEquals("0", val);
val = this.dataValueProcessor.processFormFieldValue(request, "param1", "value1", "text");
assertEquals("value1", val);
dataComposer.endPage();
// Restore state
IState state = stateUtil.restoreState(stateValue);
assertNotNull(state);