### Question:
StringBuilderWriter extends Writer implements Serializable { @Override public void close() { } StringBuilderWriter();  StringBuilderWriter(final int capacity);  StringBuilderWriter(final StringBuilder builder); @Override Writer append(final char value); @Override Writer append(final CharSequence value); @Override Writer append(final CharSequence value, final int start, final int end); @Override void close(); @Override void flush(); @Override void write(final String value); @Override void write(final char[] value, final int offset, final int length); StringBuilder getBuilder(); @Override String toString();  }### Answer:
@Test public void testClose() { final Writer writer = new StringBuilderWriter(); try { writer.append("Foo"); writer.close(); writer.append("Bar"); } catch (final Throwable t) { fail("Threw: " + t); } assertEquals("FooBar", writer.toString()); }