  @Test(timeout = 180000)
  public void excessBucketsGetDiscarded() {

    // assert nothing yet discarded (because nothing is yet sent)
    assertEquals(0, appender.getDiscardedBucketsCount());

    // send stuff and wait for it to be received
    final int NUM_MSGS = 40;
    appendFullBuckets(NUM_MSGS);
    httpServer.waitForRequests(MAX_BUCKETS);

    // assert excess buckets (those > MAX_BUCKETS) were discarded
    assertEquals(NUM_MSGS - MAX_BUCKETS, appender.getDiscardedBucketsCount());
  }