DiskQueue extends AbstractQueue<String> { @Override public void clear() { memoryQueue.clear(); cachedElement = null; closeFile(); } DiskQueue(int maxInMemorySize);  DiskQueue(int maxInMemorySize, File tempDir); @Override Iterator<String> iterator(); @Override int size(); @Override boolean offer(String element); @Override String peek(); @Override String remove(); @Override String poll(); @Override void clear();  }
@Test public void testClear() { Queue<String> instance = new DiskQueue<String>(1); instance.add("testClear"); instance.clear(); assertEquals(0, instance.size()); }