public void clean(final Date now) {
    List<String> files = this.findFiles();
    List<String> expiredFiles = this.filterFiles(files, this.createExpiredFileFilter(now));
    for (String f : expiredFiles) {
      this.delete(new File(f));
    }

    if (this.totalSizeCap != CoreConstants.UNBOUNDED_TOTAL_SIZE_CAP && this.totalSizeCap > 0) {
      this.capTotalSize(files);
    }

    List<String> emptyDirs = this.findEmptyDirs();
    for (String dir : emptyDirs) {
      this.delete(new File(dir));
    }
  }
@Test
  public void keepsParentDirWhenNonEmpty() {
    // Setting an expiration date of 0 would cause no files to be deleted
    remover.clean(new Date(0));

    verify(fileProvider, never()).deleteFile(any(File.class));
  }