### Question:
FlumeEventQueue { synchronized void close() throws IOException { try { backingStore.close(); inflightPuts.close(); inflightTakes.close(); } catch (IOException e) { LOG.warn("Error closing backing store", e); } } FlumeEventQueue(EventQueueBackingStore backingStore, File inflightTakesFile,
          File inflightPutsFile); int getCapacity();  }### Answer:
@Test(expected=IllegalArgumentException.class) public void testInvalidCapacityZero() throws Exception { backingStore.close(); File checkpoint = backingStoreSupplier.getCheckpoint(); Assert.assertTrue(checkpoint.delete()); backingStore = new EventQueueBackingStoreFileV2(checkpoint, 0, "test"); queue = new FlumeEventQueue(backingStore, backingStoreSupplier.getInflightTakes(), backingStoreSupplier.getInflightPuts()); }
@Test(expected=IllegalArgumentException.class) public void testInvalidCapacityNegative() throws Exception { backingStore.close(); File checkpoint = backingStoreSupplier.getCheckpoint(); Assert.assertTrue(checkpoint.delete()); backingStore = new EventQueueBackingStoreFileV2(checkpoint, -1, "test"); queue = new FlumeEventQueue(backingStore, backingStoreSupplier.getInflightTakes(), backingStoreSupplier.getInflightPuts()); }