Implemented more unit tests for PortalChannelHandler (issue #242)