some cleanup for optics unit tests
(#601)