Extract shared query code to common method
Fix test to accommodate changed order in which road links are returned