added unit tests for collection handler