Make test 1946 faster

On overloaded machines test 1946 will sometimes time-out. To make this
test faster we will turn one of the lists into a HashMap and using
lambdas to delay expensive Arrays.toString calls. This leads to the
test being around 70% faster.

Pre-change:
% time ./test/run-test --host --dev --64 1946
<snip>
./test/run-test --host --dev --64 1946  36.28s user 25.57s system 277% cpu 22.286 total

Post-change:
% time ./test/run-test --host --dev --64 1946
<snip>
./test/run-test --host --dev --64 1946  19.06s user 26.78s system 724% cpu 6.329 total

Test: ./test.py --host
Bug: 74583462
Change-Id: Id9b761ae95f87c96c0eb2fcdf5355a804d396267
1 file changed