@Test void testWriteTo() throws IOException { FastCharArrayWriter fcaw = new FastCharArrayWriter(2); fcaw.write("Hello"); fcaw.write(' '); fcaw.write("World"); fcaw.write('!'); StringWriter sw = new StringWriter(); fcaw.writeTo(sw); assertEquals("Hello World!", sw.toString()); }