@Test
    public void release() {
        CapacityManager mgr = new CapacityManager(10);
        mgr.acquire(10);
        mgr.release();
        Assert.assertEquals(mgr.availableCapacity(), 1);
        Assert.assertEquals(mgr.consumedCapacity(), 9);
        mgr.release(50);
        Assert.assertEquals(mgr.availableCapacity(), 10);
        Assert.assertEquals(mgr.consumedCapacity(), 0);
    }
Tests that capacity can be properly released, making additional capacity
available to be acquired.
aws-java-sdk-core/src/test/java/com/amazonaws/util/CapacityManagerTest.java