/// <summary>
        /// transition from one edge to the next
        /// </summary>
        /// <param name="edge">the previous edge</param>
        /// <param name="newTarget">the new target vertex id</param>
        /// <returns>the new edge</returns>
        internal ITestingTrapezoidEdge TestTransition(ITestingTrapezoidEdge edge, int newTarget)
        {
            if (edge is TrapezoidEdge trapezoidEdge)
            {
                return(this.Transition(trapezoidEdge, newTarget, newTarget));
            }

            throw new InvalidOperationException("Invalid use of internal test function");
        }
        /// <summary>
        /// Two edges join in a final vertex
        /// </summary>
        /// <param name="lower">the lower edge</param>
        internal void TestJoin(ITestingTrapezoidEdge lower)
        {
            if (lower is TrapezoidEdge trapezoidEdge)
            {
                this.JoinTrapezoidEdges(trapezoidEdge);
                return;
            }

            throw new InvalidOperationException("Invalid use of internal test function");
        }