### Question:
ReferenceCountedACLCache { public synchronized void addUsage(Long acl) { if (acl == OPEN_UNSAFE_ACL_ID) { return; } if (!longKeyMap.containsKey(acl)) { LOG.info("Ignoring acl {} as it does not exist in the cache", acl); return; } AtomicLong count = referenceCounter.get(acl); if (count == null) { referenceCounter.put(acl, new AtomicLongWithEquals(1)); } else { count.incrementAndGet(); } }  synchronized Long convertAcls(List<ACL> acls); synchronized List<ACL> convertLong(Long longVal); void deserialize(InputArchive ia); void serialize(OutputArchive oa); int size(); synchronized void addUsage(Long acl); synchronized void removeUsage(Long acl); synchronized void purgeUnused();  }### Answer:
@Test public void testAddUsage() { List<ACL> testACL = createACL("myid"); ReferenceCountedACLCache cache = new ReferenceCountedACLCache(); Long aclId = cache.convertAcls(testACL); assertEquals(1, cache.size()); cache.addUsage(aclId); assertEquals(1, cache.size()); cache.removeUsage(aclId); assertEquals(1, cache.size()); cache.removeUsage(aclId); assertEquals(0, cache.size()); }