public static boolean deleteTaskTree() {
        Data data=new Data("SomeData");
        IDGenerator generator = new IDGenerator();
        TaskTree tree = new TaskTree(generator, data);
        TaskTree tree1 = new TaskTree(generator, data);
        TaskTree tree2 = new TaskTree(generator, data);
        tree.add(tree1);
        tree.add(tree2);
        tree.delete(tree1.getID());
        TaskTree[] kids=tree.getChildren();
        for(int i=0; i<kids.length; i++)
        {
            if (kids[i]==tree1) return false;
        }
        tree.add(tree1);
        boolean result=false;
        try{
            tree.delete();
        }
        catch(NoParentTreeException ex)
        {
            result=true;
        }
        if (result==false) return false;
        tree1.delete();
        kids=tree.getChildren();
        for(int i=0; i<kids.length; i++)
        {
            if (kids[i]==tree1) return false;
        }
        return true;
    }