improving test coverage for Apache Http Client and cleaning up Netty code