### Question:
DiskLruCache implements Closeable { public static DiskLruCache open(File directory, int appVersion, int valueCount, long maxSize) throws IOException { if (maxSize <= 0) { throw new IllegalArgumentException("maxSize <= 0"); } if (valueCount <= 0) { throw new IllegalArgumentException("valueCount <= 0"); } File backupFile = new File(directory, JOURNAL_FILE_BACKUP); if (backupFile.exists()) { File journalFile = new File(directory, JOURNAL_FILE); if (journalFile.exists()) { backupFile.delete(); } else { renameTo(backupFile, journalFile, false); } } DiskLruCache cache = new DiskLruCache(directory, appVersion, valueCount, maxSize); if (cache.journalFile.exists()) { try { cache.readJournal(); cache.processJournal(); return cache; } catch (IOException journalIsCorrupt) { System.out .println("DiskLruCache " + directory + " is corrupt: " + journalIsCorrupt.getMessage() + ", removing"); cache.delete(); } } directory.mkdirs(); cache = new DiskLruCache(directory, appVersion, valueCount, maxSize); cache.rebuildJournal(); return cache; } private  DiskLruCache(File directory, int appVersion, int valueCount, long maxSize); static DiskLruCache open(File directory, int appVersion, int valueCount, long maxSize); synchronized Value get(String key); Editor edit(String key); File getDirectory(); synchronized long getMaxSize(); synchronized void setMaxSize(long maxSize); synchronized long size(); synchronized boolean remove(String key); synchronized boolean isClosed(); synchronized void flush(); synchronized void close(); void delete();  }### Answer:
@Test public void constructorDoesNotAllowZeroCacheSize() throws Exception { try { DiskLruCache.open(cacheDir, appVersion, 2, 0); Assert.fail(); } catch (IllegalArgumentException expected) { } }
@Test public void constructorDoesNotAllowZeroValuesPerEntry() throws Exception { try { DiskLruCache.open(cacheDir, appVersion, 0, 10); Assert.fail(); } catch (IllegalArgumentException expected) { } }