}
public void testLeafTreeNode() {
PageConfig pc = new PageConfig();
pc.setIcon("/images/ico_deploy_16x16.gif");
pc.setName("1-2/applications/deploy");
TreeNode leafNode=null;
try {
leafNode=new TreeNode(pc);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Assert.assertNotNull(leafNode);
Assert.assertEquals("1-2", leafNode.getId());
Assert.assertEquals("applications/deploy", leafNode.getPath());
Assert.assertEquals("deploy", leafNode.getLabel());
Assert.assertEquals("/images/ico_deploy_16x16.gif", leafNode.getIcon());
Assert.assertTrue(leafNode.isLeafNode());
Assert.assertFalse(leafNode.isTopNode());
Assert.assertNull(leafNode.getChildren());
//test illegal pageConfig name
pc = new PageConfig();
pc.setIcon("/images/ico_deploy_16x16.gif");
pc.setName("applications/deploy");
leafNode=null;
try {
leafNode=new TreeNode(pc);
} catch (Exception e) {
return;