@SuppressWarnings("unchecked")
@Test
public void largeContentCacheFilesAreNotKeptOnDisk() throws IOException
{

    quota.setMaxFileSizeMB(3);
    writeSingleFileInMB(1);
    writeSingleFileInMB(2);
    writeSingleFileInMB(3);
    writeSingleFileInMB(4);
    
    List<File> files = new ArrayList<File>(findCacheFiles());
    assertEquals(3, files.size());
    Collections.sort(files,SizeFileComparator.SIZE_COMPARATOR);
    assertEquals(1, files.get(0).length() / FileUtils.ONE_MB);
    assertEquals(2, files.get(1).length() / FileUtils.ONE_MB);
    assertEquals(3, files.get(2).length() / FileUtils.ONE_MB);
}