DefaultSessionStats extends AbstractStats implements SessionStats { @Override public long lastUpdateTime() { return lastUpdateTime; } 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 testLastUpdateTime() { sessionStats.increaseOutputBytes(FIXED_INCREASE); Assert.assertTrue(System.currentTimeMillis() - sessionStats.lastUpdateTime() < 10); sleep(100); Assert.assertTrue(System.currentTimeMillis() - sessionStats.lastUpdateTime() >= 100); }