Example code for https://jira.springsource.org/browse/SPR-11406