Forward-port Netty handling tests

The #1623 fix on the 2.1 branch introduced some useful Netty tests. These would be worth forward-porting to *master*.