@Test
  public void testRemoveById() throws Exception {
    final DefaultDiskStorage storage = getStorageSupplier(1).get();

    final String resourceId1 = "resource1";
    final byte[] value1 = new byte[100];
    writeFileToStorage(storage, resourceId1, value1);
    final String resourceId2 = "resource2";
    final byte[] value2 = new byte[100];
    writeFileToStorage(storage, resourceId2, value2);
    final String resourceId3 = "resource3";
    final byte[] value3 = new byte[100];
    writeFileToStorage(storage, resourceId3, value3);

    assertTrue(storage.contains(resourceId1, null));
    assertTrue(storage.contains(resourceId2, null));
    assertTrue(storage.contains(resourceId3, null));

    storage.remove(resourceId2);
    assertTrue(storage.contains(resourceId1, null));
    assertFalse(storage.contains(resourceId2, null));
    assertTrue(storage.contains(resourceId3, null));

    storage.remove(resourceId1);
    assertFalse(storage.contains(resourceId1, null));
    assertFalse(storage.contains(resourceId2, null));
    assertTrue(storage.contains(resourceId3, null));

    storage.remove(resourceId3);
    assertFalse(storage.contains(resourceId1, null));
    assertFalse(storage.contains(resourceId2, null));
    assertFalse(storage.contains(resourceId3, null));
  }
Inserts 3 files with different dates. Check what files are there. Uses an iterator to remove
the one in the middle. Check that later.

@throws Exception
imagepipeline-base/src/test/java/com/facebook/cache/disk/DefaultDiskStorageTest.java