### Question:
KeyBuffer { public void add(String s){ Key newKey = new Key(s); if (head == null){ head = newKey; tail = newKey; } else { tail.setNext(newKey); newKey.setPrev(tail); tail = newKey; } size++; } KeyBuffer(); void add(String s); int size(); @Override String toString(); String drain(); void free();  }### Answer:
@Test public void testAdd(){ assertEquals(0, k.size()); k.add(testString); assertEquals(1,k.size()); }