facesContext.setApplication(application);
facesContext.setViewRoot(root);
facesContext.setELContext(elContext);
expect(application.getViewHandler()).andReturn(viewHandler);
expect(viewHandler.calculateLocale(facesContext)).andReturn(Locale.ENGLISH);
expect(application.getMessageBundle()).andReturn("javax.faces.Messages");
expect(application.getExpressionFactory()).andReturn(expressionFactory);
String s = "xxx: Validation Error: Value is greater than allowable maximum of \"xyz\"";
expect(expressionFactory.createValueExpression(elContext,s,String.class)).andReturn(valueExpression);
expect(valueExpression.getValue(elContext)).andReturn(s);