@Test public void it_only_stores_up_to_the_defined_buffer_size() { Buffer buffer = new Buffer(10); addStringsToBuffer(buffer, 10); assertEquals(10, buffer.get().size()); buffer = new Buffer(10); addStringsToBuffer(buffer, 5); assertEquals(5, buffer.get().size()); buffer = new Buffer(10); addStringsToBuffer(buffer, 20); assertEquals(10, buffer.get().size()); }
public List<String> get() { return buffer; }
Buffer { public List<String> get() { return buffer; } }
Buffer { public List<String> get() { return buffer; } Buffer(int size);   Buffer(); }
Buffer { public List<String> get() { return buffer; } Buffer(int size);   Buffer(); List<String> get(); void add(String log); void clear(); }
Buffer { public List<String> get() { return buffer; } Buffer(int size);   Buffer(); List<String> get(); void add(String log); void clear();  }