Extract channels and router in channel_test
Fix unused var