DiskQueue extends AbstractQueue<String> { @Override public String remove() { loadMemoryQueue(); return memoryQueue.remove(); } 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 testRemove_whenEmpty() { assertThrows(IndexOutOfBoundsException.class, () -> { Queue<String> instance = new DiskQueue<String>(1); instance.remove(); }); }
@Test public void testRemove() { Queue<String> instance = new DiskQueue<String>(1); String element = "testRemove"; instance.add(element); String result = instance.remove(); assertEquals(element, result); }