public void traversal(Node root){
        //find starting point for right side
        Node current = root;
        while(current != null){
            if(current.right != null && current.left != null){
                current = current.right;
                break;
            }
            current = current.left != null ? current.left : current.right;
        }
        printRightSide(current);
        printLeaves(root);
        printLeftSide(root);
    }
http://www.geeksforgeeks.org/boundary-traversal-of-binary-tree/
Test cases
All left children
All right children
Full tree
Complete tree
src/com/interview/tree/BoundaryTraversal.java