Merge "Refactor scan_test.cc" into nextgenv2