Refactor collectors to use the collector.Collector interface.
Refactor tests to test collector output instead of internal representations.