Add missing test for localName and add tests for exceptions