/**
  * Test method for {@link org.apache.tiles.request.jsp.JspPrintWriterAdapter#flush()}.
  *
  * @throws IOException If something goes wrong.
  */
 public void testFlush() throws IOException {
   JspWriter writer = createMock(JspWriter.class);
   writer.flush();
   JspPrintWriterAdapter adapter = new JspPrintWriterAdapter(writer);
   replay(writer);
   adapter.flush();
   verify(writer);
 }
 /**
  * Test method for {@link org.apache.tiles.request.jsp.JspPrintWriterAdapter#flush()}.
  *
  * @throws IOException If something goes wrong.
  */
 public void testFlushEx() throws IOException {
   JspWriter writer = createMock(JspWriter.class);
   writer.flush();
   expectLastCall().andThrow(new IOException());
   writer.flush();
   JspPrintWriterAdapter adapter = new JspPrintWriterAdapter(writer);
   replay(writer);
   adapter.flush();
   assertTrue(adapter.checkError());
   verify(writer);
 }