### Question:
ThriftScanner { static long pause(long millis, long maxSleep) throws InterruptedException { Thread.sleep(millis); return (long) (Math.min(millis * 2, maxSleep) * (.9 + secureRandom.nextDouble() / 5)); }  static boolean getBatchFromServer(ClientContext context, Range range, KeyExtent extent,
      String server, SortedMap<Key,Value> results, SortedSet<Column> fetchedColumns,
      List<IterInfo> serverSideIteratorList,
      Map<String,Map<String,String>> serverSideIteratorOptions, int size,
      Authorizations authorizations, long batchTimeOut, String classLoaderContext); static List<KeyValue> scan(ClientContext context, ScanState scanState, long timeOut); static final Map<TabletType,Set<String>> serversWaitedForWrites; }### Answer:
@Test public void testPauseIncrease() throws Exception { long newPause = ThriftScanner.pause(5L, 5000L); assertTrue("New pause should be within [9,11], but was " + newPause, withinTenPercent(10L, newPause)); }
@Test public void testMaxPause() throws Exception { long maxPause = 1L; long nextPause = ThriftScanner.pause(5L, maxPause); assertTrue("New pause should be within [0,2], but was " + nextPause, withinTenPercent(maxPause, nextPause)); }