### Question:
DiskBasedCache implements Cache { @Override public synchronized void put(String key, Entry entry) { pruneIfNeeded(entry.data.length); File file = getFileForKey(key); try { BufferedOutputStream fos = new BufferedOutputStream(createOutputStream(file)); CacheHeader e = new CacheHeader(key, entry); boolean success = e.writeHeader(fos); if (!success) { fos.close(); VolleyLog.d("Failed to write header for %s", file.getAbsolutePath()); throw new IOException(); } fos.write(entry.data); fos.close(); putEntry(key, e); return; } catch (IOException e) { } boolean deleted = file.delete(); if (!deleted) { VolleyLog.d("Could not clean up file %s", file.getAbsolutePath()); } } DiskBasedCache(File rootDirectory, int maxCacheSizeInBytes);  DiskBasedCache(File rootDirectory); @Override synchronized void clear(); @Override synchronized Entry get(String key); @Override synchronized void initialize(); @Override synchronized void invalidate(String key, boolean fullExpire); @Override synchronized void put(String key, Entry entry); @Override synchronized void remove(String key); File getFileForKey(String key);  }### Answer:
@Test public void testManyResponseHeaders() { Cache.Entry entry = new Cache.Entry(); entry.data = new byte[0]; entry.responseHeaders = new HashMap<>(); for (int i = 0; i < 0xFFFF; i++) { entry.responseHeaders.put(Integer.toString(i), ""); } cache.put("key", entry); }