DefaultMapper attributeMapper = new DefaultMapper();
ExpressionParser parser = new WebFlowSpringELExpressionParser(new SpelExpressionParser());
Expression x = parser.parseExpression("flowScope.attr",
new FluentParserContext().evaluate(RequestContext.class));
Expression y = parser.parseExpression("attr", new FluentParserContext().evaluate(MutableAttributeMap.class));
attributeMapper.addMapping(new DefaultMapping(x, y));
flow.setOutputMapper(attributeMapper);
MockRequestControlContext context = new MockRequestControlContext(flow);
context.getFlowScope().put("attr", "foo");
LocalAttributeMap<Object> sessionOutput = new LocalAttributeMap<Object>();
flow.end(context, "finish", sessionOutput);