Remove dependency on spring-test by using a similar technique to PageRenderer (can't use PageRenderer itself because it doesn't support locale customisation)