Testing of the imaging properties of optical elements and systems