Correct assert and add with_items test
Merge pull request #6146 from jlaska/test_synchronize

Correct assert and add with_items test