public HpackHeaderField remove() {
        HpackHeaderField removed = hpackHeaderFields[tail];
        if (removed == null) {
            return null;
        }
        size -= removed.size();
        hpackHeaderFields[tail++] = null;
        if (tail == hpackHeaderFields.length) {
            tail = 0;
        }
        return removed;
    }
@Test
    public void testRemove() {
        HpackDynamicTable table = new HpackDynamicTable(100);
        assertNull(table.remove());
        HpackHeaderField entry1 = new HpackHeaderField(FOO, BAR);
        HpackHeaderField entry2 = new HpackHeaderField(HELLO, WORLD);
        table.add(entry1);
        table.add(entry2);
        assertEquals(entry1, table.remove());
        assertEquals(entry2, table.getEntry(1));
        assertEquals(1, table.length());
        assertEquals(entry2.size(), table.size());
    }