public void GetSegmentForNetworkLocationTest()
        {
            var network       = CreateThreeNodesNetwork(); // new Point(0, 0), new Point(100, 0), new Point(300, 0)
            var branch0T100   = (Branch)network.Branches[0];
            var branch100T300 = (Branch)network.Branches[1];

            var route = RouteHelper.CreateRoute(new[]
            {
                new NetworkLocation(branch0T100, 20.0),
                new NetworkLocation(branch0T100, 80.0),
                new NetworkLocation(branch100T300, 20.0)
            });

            Assert.AreEqual(3, route.Segments.Values.Count);
            INetworkSegment networkSegment;

            networkSegment = RouteHelper.GetSegmentForNetworkLocation(route, new NetworkLocation(branch0T100, 10));
            Assert.IsNull(networkSegment);
            networkSegment = RouteHelper.GetSegmentForNetworkLocation(route, new NetworkLocation(branch0T100, 50));
            Assert.AreEqual(networkSegment, route.Segments.Values[0]);
            networkSegment = RouteHelper.GetSegmentForNetworkLocation(route, new NetworkLocation(branch0T100, 90));
            Assert.AreEqual(networkSegment, route.Segments.Values[1]);
            networkSegment = RouteHelper.GetSegmentForNetworkLocation(route, new NetworkLocation(branch100T300, 10));
            Assert.AreEqual(networkSegment, route.Segments.Values[2]);
            networkSegment = RouteHelper.GetSegmentForNetworkLocation(route, new NetworkLocation(branch100T300, 30));
            Assert.IsNull(networkSegment);
        }