[test] fix string comparison when used in context of iterator