### Question:
NIOServerCnxn extends ServerCnxn { @Override protected ServerStats serverStats() { if (zkServer == null) { return null; } return zkServer.serverStats(); } NIOServerCnxn(ZooKeeperServer zk, SocketChannel sock, SelectionKey sk, NIOServerCnxnFactory factory, SelectorThread selectorThread); void sendCloseSession(); void sendBuffer(ByteBuffer... buffers); boolean isSelectable(); void disableSelectable(); void enableSelectable(); void disableRecv(boolean waitDisableRecv); void enableRecv(); int getSessionTimeout(); @Override String toString(); @Override void close(DisconnectReason reason); static void closeSock(SocketChannel sock); @Override int sendResponse(ReplyHeader h, Record r, String tag, String cacheKey, Stat stat, int opCode); @Override void process(WatchedEvent event); @Override long getSessionId(); @Override void setSessionId(long sessionId); @Override void setSessionTimeout(int sessionTimeout); @Override int getInterestOps(); @Override InetSocketAddress getRemoteSocketAddress(); InetAddress getSocketAddress(); @Override boolean isSecure(); @Override Certificate[] getClientCertificateChain(); @Override void setClientCertificateChain(Certificate[] chain);  }### Answer:
@Test public void testClientResponseStatsUpdate() throws IOException, InterruptedException, KeeperException { try (ZooKeeper zk = createClient()) { BufferStats clientResponseStats = serverFactory.getZooKeeperServer().serverStats().getClientResponseStats(); assertThat("Last client response size should be initialized with INIT_VALUE", clientResponseStats.getLastBufferSize(), equalTo(BufferStats.INIT_VALUE)); zk.create("/a", "test".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); assertThat("Last client response size should be greater then zero after client request was performed", clientResponseStats.getLastBufferSize(), greaterThan(0)); } }