@Test
public void nullSafeGetBooleanAttribute() throws XPathExpressionException {

    Node node = (Node) XPathFactory.newInstance().newXPath().evaluate("/test", doc, XPathConstants.NODE);
    assertTrue(XMLUtils.nullSafeGetBooleanAttribute(node, "boolVal"));
    assertFalse(XMLUtils.nullSafeGetBooleanAttribute(node, "chuckNorris"));
}