HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put(foo, 0);
ConcurrencyManager cm1 = new ConcurrencyManager(map);
Permit permit1 = cm1.getPermit(foo);
assert permit1 != null;
cm1.releasePermit(permit1);
map = new HashMap<String, Integer>();
map.put(foo, -1); // negative, just like it was 0
ConcurrencyManager cm2 = new ConcurrencyManager(map);
Permit permit2 = cm2.getPermit(foo);
assert permit2 != null;
cm2.releasePermit(permit2);
cm2.releasePermit(permit1); // a no-op since permit1 wasn't granted by cm2
}