DefaultSessionStats extends AbstractStats implements SessionStats { @Override public void increaseOutputBytes(long bytes) { updateLastTime(); outputBytes.getAndAdd(bytes); } DefaultSessionStats(ScheduledExecutorService scheduled); @Override void increaseInputBytes(long bytes); @Override void increaseOutputBytes(long bytes); @Override long lastUpdateTime(); @Override long getInputBytes(); @Override long getOutputBytes(); @Override long getInputInstantaneousBPS(); @Override long getOutputInstantaneousBPS(); @Override List<AutoReadEvent> getAutoReadEvents(); @Override void onInit(); @Override void onEstablished(); @Override void onWritable(); @Override void onNotWritable(); @Override String toString();  }
@Test public void testIncreaseOutputBytes() { int N = 10; for(int i = 0; i < N; i++) { sessionStats.increaseOutputBytes(FIXED_INCREASE); } Assert.assertEquals(N * FIXED_INCREASE, sessionStats.getOutputBytes()); }