Test case for XPathObject.castToXXX()