unit test for ray intersection