@Test
    public void acquire() {
        CapacityManager mgr = new CapacityManager(10);
        Assert.assertTrue(mgr.acquire());
        Assert.assertEquals(mgr.availableCapacity(), 9);
        Assert.assertEquals(mgr.consumedCapacity(), 1);
        Assert.assertTrue(mgr.acquire(9));
        Assert.assertEquals(mgr.availableCapacity(), 0);
        Assert.assertEquals(mgr.consumedCapacity(), 10);
        Assert.assertFalse(mgr.acquire(1));
    }
Tests that capacity can be acquired when available and can not be
once exhausted.
aws-java-sdk-core/src/test/java/com/amazonaws/util/CapacityManagerTest.java