Thanks for the patch, Chang!
The main change is fine, but the test could use some cleanup. There's a lot of copy-n-paste there that is unnecessary. Since all we're doing is connecting to the socket, there's no need to override any methods except channelOpen and verifyRequest. The rest will never be invoked. And since we can access the channel in verifyRequest just as easily as we can in channelOpen, there's really no need to override channelOpen separately. We can simply check the channel state in the verifyRequest override. And since we're overriding just one method with a simple implementation, we can just do it with an anonymous class rather than the full boilerplate of a MyShuffle class.
MockShuffleHandler2 should be private static.
The 'input' variable in testSocketKeepAlive is unused.
We should disconnect the client and close the shuffle handler instance at the end of the test.