### Question:
FileBackedStringBuffer { public FileBackedStringBuffer append(CharSequence charSequence) { if (builder.length() > maxCharacters) { flushToFile(); } if (charSequence.length() < MAX) { builder.append(charSequence); } else { flushToFile(); try { copy(new StringReader(charSequence.toString()), new FileWriter(file, true)); } catch (IOException e) { LOGGER.log(Level.WARNING, e.getMessage(), e); } } return this; } FileBackedStringBuffer();  FileBackedStringBuffer(int maxChars); FileBackedStringBuffer append(CharSequence charSequence); void toWriter(Writer fw); @Override String toString(); static String readFile(File f); static String readFile(InputStream is);  }### Answer:
@Test public void appendTest() { FileBackedStringBuffer fsb = new FileBackedStringBuffer(5); String s = "0123456789"; String s3 = s + s + s; fsb.append(s); fsb.append(s); fsb.append(s); assertEquals(fsb.toString().replaceAll("\\n", ""), s3); }