Correction in CollectionTest

Added private method 'registerWriter' for tests that need a collection
item. Used this method in two tests.