Added a size check to the collectionEquals mewthod.
Updated segment tree tests to use collectionEquals() method like the
interval tree uses.