Added solution for Nashorn tests