@Override
  public String addResourceReference(String key,
      SharedCacheResourceReference ref) {
    String interned = intern(key);
    synchronized (interned) {
      SharedCacheResource resource = cachedResources.get(interned);
      if (resource == null) { // it's not mapped
        return null;
      }
      resource.addReference(ref);
      resource.updateAccessTime();
      return resource.getFileName();
    }
  }
@Test
  void testAddResourceRefNonExistentResource() throws Exception {
    startEmptyStore();
    String key = "key1";
    ApplicationId id = createAppId(1, 1L);
    // try adding an app id without adding the key first
    assertNull(store.addResourceReference(key,
        new SharedCacheResourceReference(id, "user")));
  }