1231 test compile

Single commit on top of gh-1231 (with other commits mixed in) to fix the compile error from http://hudson.openmicroscopy.org.uk/job/OMERO-merge-develop/303

Once this has built successfully and been cherry-picked elsewhere, this can be closed.