FastStringWriter extends Writer { @Override public void flush() throws IOException { }  @Override Writer append(final char c); @Override Writer append(final CharSequence csq); @Override Writer append(final CharSequence csq, final int start, final int end); @Override void write(final char[] buffer); @Override void write(final int c); @Override void write(final String str); @Override void write(final String str, final int off, final int len); @Override void write(final char[] buffer, final int off, final int len); @Override void flush(); @Override void close(); @Override String toString();  }
@Test public void flush() throws IOException { Writer writer = new FastStringWriter(); writer.flush(); IOUtils.closeQuietly(writer); }