### Question:
XmlUtil { public static boolean getBoolAttribute(Node node, String attr, boolean def) { String value = getAttribute(node, attr); if (value == null) { return def; } return Boolean.parseBoolean(value); } private  XmlUtil(); static String getAttribute(Node node, String attr, String def); static String getAttribute(Node node, String attr); static Uri getUriAttribute(Node node, String attr, Uri def); static Uri getUriAttribute(Node node, String attr); static Uri getHttpUriAttribute(Node node, String attr, Uri base, Uri def); static Uri getHttpUriAttribute(Node node, String attr, Uri base); static boolean getBoolAttribute(Node node, String attr, boolean def); static boolean getBoolAttribute(Node node, String attr); static int getIntAttribute(Node node, String attr, int def); static int getIntAttribute(Node node, String attr); static Element parse(String xml); static Element parseSilent(String xml);  }### Answer:
@Test public void getBoolAttribute() { assertTrue(XmlUtil.getBoolAttribute(node, BOOL_TRUE_ATTR)); assertFalse(XmlUtil.getBoolAttribute(node, BOOL_FALSE_ATTR)); assertTrue(XmlUtil.getBoolAttribute(node, FAKE_ATTR, true)); assertFalse(XmlUtil.getBoolAttribute(node, FAKE_ATTR, false)); assertFalse("getBoolAttribute must return false for undefined attributes.", XmlUtil.getBoolAttribute(node, FAKE_ATTR)); }