@Test
   public void testTextConversion() throws IOException
   {
      StreamTextConverter tc = new StreamTextConverter();
      File tempFile = File.createTempFile("testTextConversion", ".rtf");
      tempFile.deleteOnExit();

      InputStream is = null;
      OutputStream os = null;

      try
      {
         is = StreamTextConverterTest.class.getResourceAsStream("data/testTextConversion.rtf");
         os = new FileOutputStream(tempFile);
         tc.convert(new RtfStreamSource(is), os, "UTF-8");
      }

      finally
      {
         if (is != null)
         {
            try
            {
               is.close();
            }

            catch (Exception ex)
            {
               // Ignored
            }
         }

         if (os != null)
         {
            try
            {
               os.close();
            }

            catch (Exception ex)
            {
               // Ignored
            }
         }
      }

      InputStream actualStream = null;
      InputStream expectedStream = null;

      try
      {
         actualStream = new FileInputStream(tempFile);
         expectedStream = StreamTextConverterTest.class.getResourceAsStream("data/testTextConversion.txt");
         String expectedText = TestUtilities.readStreamToString(expectedStream);
         String actualText = TestUtilities.readStreamToString(actualStream);
         assertEquals(expectedText, actualText);
      }

      finally
      {
         try
         {
            actualStream.close();
         }

         catch (Exception ex)
         {
            // Ignored
         }

         try
         {
            expectedStream.close();
         }

         catch (Exception ex)
         {
            // Ignored
         }
      }
   }