@Test
public void testNullQuotaKey() throws Exception {

	QuotaManagerConfig config = new QuotaManagerConfig("testManager");
	Quota quota = new Quota();
	quota.setPermits(1);
	quota.setQuotaKeyFunction("(key=='key1')?key:null");
	List<Quota> quotas = new ArrayList<>();
	quotas.add(quota);
	config.setQuotas(quotas);
	
	HashMap<String, Object> bindings = new HashMap<>();
	bindings.put("key", "key2");
	
	QuotaManager manager = new QuotaManager(config);
	for(int i=0;i<100;i++) {
		UUID id = manager.acquirePermit(bindings);
		Assert.assertNotNull(id);
		UUID id2 = manager.acquirePermit(bindings);
		Assert.assertNotNull(id2);
	}
}