@Before
  public void setUp() throws IOException {
    group = new NioEventLoopGroup();
    server = new NettyRpcServer(null, getClass().getSimpleName(),
      Lists.newArrayList(new RpcServer.BlockingServiceAndInterface(SERVICE, null)),
      new InetSocketAddress("localhost", 0), CONF, new FifoRpcScheduler(CONF, 1), true);
    NettyRpcClientConfigHelper.setEventLoopConfig(CONF, group, NioSocketChannel.class);
    client = new NettyRpcClient(CONF);
    server.start();
    stub = TestProtobufRpcServiceImpl.newBlockingStub(client, server.getListenerAddress());
  }
Confirm that we truly close the NettyRpcConnection when the netty channel is closed.
hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestNettyIPCCloseConnection.java