public void abortPutIfNotCommitted(String key, File temp) {
    try {
      // If the temporary File still exists, we haven't committed. If it doesn't exist, we either
      // didn't start writing and have nothing to roll back, or we finished writing and finished
      // the rename so the edit is committed.
      if (temp != null && fileSystem.delete(temp)) {
        journal.abortPut(key);
        EntryCache.Entry entry = entries.get(key);
        entry.setUnknown();
      }
    } finally {
      EntryCache.Entry entry = entries.get(key);
      entry.releaseWriteLock();
    }
  }
@Test(expected = IllegalMonitorStateException.class)
  public void testAbortPutIfNotCommitted_withoutBeginPut_throws() {
    cache.abortPutIfNotCommitted("fakeKey", new File(cacheDir, "fakeFile"));
  }