### Question:
AbstractFileCache { public synchronized void purge() { long lastModifiedThreshold = System.currentTimeMillis() - (1000L * this.maxAgeInSeconds); int purgedFiles = 0; for (File file : this.getAllFiles()) { if (file.lastModified() < lastModifiedThreshold) { if (file.delete()) { purgedFiles++; } else { LOGGER.warn(String.format(Messages.getString("AbstractFileCache.Warn.CouldNotDeletePurging"), file.getAbsolutePath())); } } } if (purgedFiles > 0) { LOGGER.info(String.format(Messages.getString("AbstractFileCache.Info.Purged"), purgedFiles)); } } protected  AbstractFileCache(File cacheDirectory, String prefix, String suffix, final int maxAgeInSeconds); synchronized void clear(); synchronized boolean containsKey(K key); synchronized byte[] get(K key); synchronized InputStream getAsInputStream(K key); File getCacheDirectory(); File getCacheFile(K key); synchronized void purge(); synchronized void put(K key, byte[] value); synchronized void putFile(K key, File file, boolean move); synchronized void remove(K key);  }### Answer:
@Test public void testPurge() throws CacheException, InterruptedException { byte[] testBytes = "test".getBytes(StandardCharsets.US_ASCII); underTest.maxAgeInSeconds = 1; underTest.put("test1", testBytes); underTest.put("test2", testBytes); underTest.purge(); assertTrue(underTest.containsKey("test1")); assertTrue(underTest.containsKey("test2")); Thread.sleep(1500); underTest.put("test3", testBytes); underTest.purge(); assertFalse(underTest.containsKey("test1")); assertFalse(underTest.containsKey("test2")); assertTrue(underTest.containsKey("test3")); }