public static void compare(final Reader resultReader,final Reader expectedReader,final ResourcePostProcessor processor) throws IOException {
  final Writer resultWriter=new StringWriter();
  processor.process(resultReader,resultWriter);
  final Writer expectedWriter=new StringWriter();
  IOUtils.copy(expectedReader,expectedWriter);
  compare(expectedWriter.toString(),resultWriter.toString());
  expectedReader.close();
  expectedWriter.close();
}

public static void compare ( final Reader resultReader , final Reader expectedReader , final ResourcePostProcessor processor ) throws IOException { final Writer resultWriter = new StringWriter ( ) ; processor . process ( resultReader , resultWriter ) ; final Writer expectedWriter = new StringWriter ( ) ; IOUtils . copy ( expectedReader , expectedWriter ) ; compare ( expectedWriter . toString ( ) , resultWriter . toString ( ) ) ; expectedReader . close ( ) ; expectedWriter . close ( ) ; }
compare contents of two resources ( files ) by performing some sort of processing on input resource .
