Test sorting of contacts #467

for issue #467