@Test
public void failedFutureReturnedIfQueueIsfull() {

    BufferedRateLimiter limiter = new BufferedRateLimiter(1, 1, 100);
    ListenableFuture<Void> actual1 = limiter.acquireAsync();
    ListenableFuture<Void> actual2 = limiter.acquireAsync();
    ListenableFuture<Void> actual3 = limiter.acquireAsync();
    assertTrue(actual1.isDone());
    assertFalse(actual2.isDone());
    assertTrue(actual3.isDone());
    try {
        actual3.get();
        fail();
    } catch (Exception e) {
        assertTrue(e instanceof ExecutionException);
        Throwable actualCause = e.getCause();
        assertTrue(actualCause instanceof BufferLimitException);
        assertEquals("Rate Limit Buffer is full", actualCause.getMessage());
    }
}