Improvements to channel unit testing.

Inserted an intermediate superclass for the channel unit tests, for code reuse.
And to make test case creation easier (via duplication and find/replace).