code:   public void withFieldsAndXpath() throws Exception {
      File tmpdir = File.createTempFile("test", "tmp", TEMP_DIR);
      tmpdir.delete();
      tmpdir.mkdir();
      tmpdir.deleteOnExit();
      createFile(tmpdir, "x.xsl", xsl.getBytes("UTF-8"), false);
      Map entityAttrs = createMap("name", "e", "url", "cd.xml",
              XPathEntityProcessor.FOR_EACH, "/catalog/cd");
      List fields = new ArrayList();
      fields.add(createMap("column", "title", "xpath", "/catalog/cd/title"));
      fields.add(createMap("column", "artist", "xpath", "/catalog/cd/artist"));
      fields.add(createMap("column", "year", "xpath", "/catalog/cd/year"));
      Context c = getContext(null,
              new VariableResolverImpl(), getDataSource(cdData), Context.FULL_DUMP, fields, entityAttrs);
      XPathEntityProcessor xPathEntityProcessor = new XPathEntityProcessor();
      xPathEntityProcessor.init(c);
      List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
      while (true) {
        Map<String, Object> row = xPathEntityProcessor.nextRow();
        if (row == null)
          break;
        result.add(row);
      }
      assertEquals(3, result.size());
      assertEquals("Empire Burlesque", result.get(0).get("title"));
      assertEquals("Bonnie Tyler", result.get(1).get("artist"));
      assertEquals("1982", result.get(2).get("year"));
    }
  
    @Test
  