protected void rotateRight(Node<T> node) {
        Position parentPosition = null;
        Node<T> parent = node.parent;
        if (parent != null) {
            if (node.equals(parent.lesser)) {
                // Lesser
                parentPosition = Position.LEFT;
            } else {
                // Greater
                parentPosition = Position.RIGHT;
            }
        }

        Node<T> lesser = node.lesser;
        node.lesser = null;
        Node<T> greater = lesser.greater;

        lesser.greater = node;
        node.parent = lesser;

        node.lesser = greater;
        if (greater != null)
            greater.parent = node;

        if (parent!=null && parentPosition != null) {
            if (parentPosition == Position.LEFT) {
                parent.lesser = lesser;
            } else {
                parent.greater = lesser;
            }
            lesser.parent = parent;
        } else {
            root = lesser;
            lesser.parent = null;
        }
    }