The GetLongestPrefix implementation did not return the expected value when given paths that (1) diverged from map nodes at a non-entry node or that (2) terminated at a non-entry (but existent) node. This change updates GetLongestPrefix to have the expected behaviour and updates the testing to systematically explore test input scenarios.
The GetLongestPrefix implementation did not return the expected value when given paths that (1) diverged from map nodes at a non-entry node or that (2) terminated at a non-entry (but existent) node. This change updates GetLongestPrefix to have the expected behaviour and updates the testing to systematically explore test input scenarios.