Fix unit test for SAM type conversion in case of method accepting a closure