}
};
inputText.setConverter(converter);
ValueExpression expression = new MockValueExpression("#{requestScope.someDefaultValueOnBean}",String.class);
expression.setValue(facesContext.getELContext(), "defaultValue");
inputText.setValueExpression("value", expression);
// 1) user enters an empty string in an input-component: ""
//Call to setSubmittedValue on HtmlRendererUtils.decodeUIInput(facesContext, component),
//that is called from renderer decode()
externalContext.addRequestParameterMap(inputText.getClientId(facesContext), "");
inputText.decode(facesContext);
// 2) conversion and validation phase: "" --> setValue(null);
// isLocalValueSet = true; setSubmittedValue(null);
inputText.validate(facesContext);
// 3) validation fails in some component on the page --> update model
// phase is skipped
// No OP
// 4) renderer calls getValue(); --> getValue() evaluates the
// value-binding, as the local-value is 'null', and I get the
// default-value of the bean shown again
assertNotSame(expression.getValue(facesContext.getELContext()), inputText.getValue());
assertNull(inputText.getValue());
}