test for behaviour of mongodb query iterator