DefaultKeeperStats extends AbstractStartStoppable implements KeeperStats { @Override public void increaseOutputBytes(long bytes) { outputBytes.addAndGet(bytes); } DefaultKeeperStats(String shard, ScheduledExecutorService scheduled); @Override void increaseFullSync(); @Override long getFullSyncCount(); @Override void increatePartialSync(); @Override long getPartialSyncCount(); @Override void increatePartialSyncError(); @Override long getPartialSyncErrorCount(); @Override long increaseWaitOffsetSucceed(); @Override long increasWaitOffsetFail(); @Override long getWaitOffsetSucceed(); @Override long getWaitOffsetFail(); @Override long getInputInstantaneousBPS(); @Override long getOutputInstantaneousBPS(); @Override void increaseInputBytes(long bytes); @Override void increaseOutputBytes(long bytes); @Override long getInputBytes(); @Override long getOutputBytes(); @Override long getPeakInputInstantaneousBPS(); @Override long getPeakOutputInstantaneousBPS(); @Override void increasePsyncSendFail(); @Override long getPsyncSendFailCount(); @Override void setLastPsyncFailReason(PsyncFailReason reason); @Override PsyncFailReason getLastPsyncFailReason();  }
@Test public void testIncreaseOutputBytes() { int n = 10; for(int i = 0; i < n; i++) { keeperStats.increaseOutputBytes(FIXED_INCREASING_BYTES); } Assert.assertEquals(n * FIXED_INCREASING_BYTES, keeperStats.getOutputBytes()); }