//now try it with one that doesn't exist. We should get the default value
assertEquals(44, rootNode.getValueOfChildAsInt("nonexistent", 44));
//now add a single node but don't give it a value (which means its null)
SettingsNode valuelessNode = rootNode.addChild("valueless");
assertNull(valuelessNode.getValue());
//now try to get its value. We should get the default value
assertEquals(17, rootNode.getValueOfChildAsInt("valueless", 17));
//now add a single node that has an illegal value
SettingsNode illegalNode = rootNode.addChild("illegal");
illegalNode.setValue("abcdefg");
//now try to get its value. We should get the default value
assertEquals(333, rootNode.getValueOfChildAsInt("illegal", 333));
}