This unittest is excessive but not very effective, it basically checks >30000 similar situations (and takes 20ms on the autotester).
Rather focus on on checking the different code paths of the algorithm.