@Test public void testCreate() throws Exception { RateLimiter rateLimiter = RateLimiterUtil.create(20000, 0.1); Class superClass = rateLimiter.getClass().getSuperclass(); Field field = superClass.getDeclaredField("storedPermits"); field.setAccessible(true); Assert.assertEquals(2000, (int) field.getDouble(rateLimiter)); }
public static RateLimiter create(double permitsPerSecond, double maxBurstSeconds) throws ReflectiveOperationException { return create(permitsPerSecond, maxBurstSeconds, true); }
RateLimiterUtil { public static RateLimiter create(double permitsPerSecond, double maxBurstSeconds) throws ReflectiveOperationException { return create(permitsPerSecond, maxBurstSeconds, true); } }
RateLimiterUtil { public static RateLimiter create(double permitsPerSecond, double maxBurstSeconds) throws ReflectiveOperationException { return create(permitsPerSecond, maxBurstSeconds, true); }  }
RateLimiterUtil { public static RateLimiter create(double permitsPerSecond, double maxBurstSeconds) throws ReflectiveOperationException { return create(permitsPerSecond, maxBurstSeconds, true); }  static RateLimiter create(double permitsPerSecond, double maxBurstSeconds); static RateLimiter create(double permitsPerSecond, double maxBurstSeconds, boolean filledWithToken); }
RateLimiterUtil { public static RateLimiter create(double permitsPerSecond, double maxBurstSeconds) throws ReflectiveOperationException { return create(permitsPerSecond, maxBurstSeconds, true); }  static RateLimiter create(double permitsPerSecond, double maxBurstSeconds); static RateLimiter create(double permitsPerSecond, double maxBurstSeconds, boolean filledWithToken);  }