ClientThrottlingAnalyzer { @VisibleForTesting int getSleepDuration() { return sleepDuration; } private  ClientThrottlingAnalyzer();   ClientThrottlingAnalyzer(String name);   ClientThrottlingAnalyzer(String name, int period); void addBytesTransferred(long count, boolean isFailedOperation); void suspendIfNecessary();  }
@Test public void testNoMetricUpdatesThenNoWaiting() { ClientThrottlingAnalyzer analyzer = new ClientThrottlingAnalyzer( "test", ANALYSIS_PERIOD); validate(0, analyzer.getSleepDuration()); sleep(ANALYSIS_PERIOD_PLUS_10_PERCENT); validate(0, analyzer.getSleepDuration()); }