TreeModelSupport { public void firePathChanged(TreePath path) { Object node = path.getLastPathComponent(); TreePath parentPath = path.getParentPath(); if (parentPath == null) fireChildrenChanged(path, null, null); else { Object parent = parentPath.getLastPathComponent(); fireChildChanged(parentPath, treeModel .getIndexOfChild(parent, node), node); } } TreeModelSupport(TreeModel model); void fireNewRoot(); void firePathLeafStateChanged(TreePath path); void fireTreeStructureChanged(TreePath subTreePath); void firePathChanged(TreePath path); void fireChildChanged(TreePath parentPath, int index, Object child); void fireChildrenChanged(TreePath parentPath, int[] indices,
            Object[] children); void fireChildAdded(TreePath parentPath, int index, Object child); void fireChildRemoved(TreePath parentPath, int index, Object child); void fireChildrenAdded(TreePath parentPath, int[] indices,
            Object[] children); void fireChildrenRemoved(TreePath parentPath, int[] indices,
            Object[] children); void addTreeModelListener(TreeModelListener l); TreeModelListener[] getTreeModelListeners(); void removeTreeModelListener(TreeModelListener l);  }
@Test public void testPathChangedNotNullPathElements() { TreePath path = new TreePath(new Object[] {null}); try { support.firePathChanged(path); fail("must not allow null path elements"); } catch (NullPointerException e) { } }
@Test public void testPathChangedNotNullPath() { try { support.firePathChanged(null); fail("must not allow null path elements"); } catch (NullPointerException e) { } }