added tests for collection modification
fixed pull request according to comments
Merge pull request #24 from cleandart/deterministic_tests

added tests for collection modification