@Test
public void testAcquireException() throws Exception {

	QuotaManagerConfig config = new QuotaManagerConfig("testManager");
	Quota quota = new Quota();
	quota.setPermits(1);
	quota.setAcquireTimeoutMs(0);
	quota.setQuotaKeyFunction("key");
	List<Quota> quotas = new ArrayList<>();
	quotas.add(quota);
	config.setQuotas(quotas);
	
	HashMap<String, Object> bindings = new HashMap<>();
	bindings.put("key", "key1");
	
	QuotaManager manager = new QuotaManager(config);
	boolean exceptionThrown = false;
	try {
		UUID id = manager.acquirePermit(bindings);
		Assert.assertNotNull(id);
		manager.acquirePermit(bindings);
		Assert.assertTrue(false);
	} catch (TimeoutException e) {
		exceptionThrown = true;
	}
	Assert.assertTrue(exceptionThrown);
	
}