So it depends what you want to test exactly. If you want to do a full integration test you can spin up your ServerBootstrap and use a ClientBootstrap to drive it. However, this would involve testing the whole NIO stack + whatever ChannelHandlers your put in. If you just want to test your business logic the new NIOAsyncChannel is providing some testing facilities which allow you to drive the NIOAsyncChannelInboundStream and the NIOAsyncChannelOutboundWriter. With this you should be able to unit test your business logic that resides outside of the channel pipeline.
I think in this case I would like to do a full integration test, as I want to make sure the server as a whole behaves as expected. And it would also allow me to perform tests for edge cases like interrupted connections, incomplete data, large data volumes coming in, etc.
The business logic itself, I will mostly test outside of NIO.
Do you have an example of such a ServerBootstrap and ClientBootstrap?
This is a test that uses the new async bootstraps to spin up a ServerBootstrap and a ClientBootstrap. Let me know if this is a good starting point for you or if you have more questions!