A couple of tests for Nashorn
(cherry picked from commit c2873c2)