### Question:
LinkedBufferOutput extends BufferedOutput { public int getSize() { return size + filled; } LinkedBufferOutput(int bufferSize); byte[] toByteArray(); int getSize(); void clear(); @Override void close();  }### Answer:
@Test public void testGetSize() throws IOException { LinkedBufferOutput o = new LinkedBufferOutput(10); for(int i=0; i < 21; i++) { o.writeByte((byte)1); assertEquals(i+1, o.getSize()); } }