  @Test
  public void testProcessReaderString() {

    try {

      for (String filename : listFiles("examples")) {
        if (filename.endsWith(".xsparql")) {
          System.out.println("Testing " + filename + " ...");
          Reader queryReader = loadReaderFromClasspath(filename);
          processor.process(queryReader);
        }
      }

    } catch (RecognitionException e) {
      fail("Exception: " + e.getMessage());
    } catch (Exception e) {
      ByteArrayOutputStream os = new ByteArrayOutputStream();
      PrintStream ps = new PrintStream(os);
      e.printStackTrace(ps);
      fail("Exception: " + os.toString());
    }
  }