@Test
  public void testSimpleMapping() throws IOException {

    String query =
        "using cleansing;"
            + "$usCongressMembers = read from '"
            + this.usCongressMembers.toURI()
            + "';\n"
            + "$usCongressBiographies = read from '"
            + this.usCongressBiographies.toURI()
            + "';\n"
            + "$person, $legalEntity = transform records $usCongressMembers, $usCongressBiographies\n"
            + "where ($usCongressMembers.biography == $usCongressBiographies.biographyId)\n"
            + "into [\n"
            + "  entity $person with {"
            + // identified by $person.pname
            "    pname: $usCongressMembers.name,\n"
            + "    pworksFor: $legalEntity.id"
            + "  },"
            + "  entity $legalEntity identified by $legalEntity.lname with {"
            + "    lname: $usCongressBiographies.worksFor"
            + "  }"
            + "];\n"
            + "write $person to '"
            + this.person.toURI()
            + "';\n"
            + "write $legalEntity to '"
            + this.legalEntity.toURI()
            + "';";

    final SopremoPlan plan = parseScript(query);

    SopremoUtil.trace();
    Assert.assertNotNull(this.client.submit(plan, null, true));

    this.testServer.checkContentsOf(
        "person.json",
        createObjectNode("id", "Andrew Adams", "pname", "Andrew Adams", "pworksFor", "CompanyXYZ"),
        createObjectNode("id", "John Adams", "pname", "John Adams", "pworksFor", null),
        createObjectNode("id", "John Doe", "pname", "John Doe", "pworksFor", "CompanyUVW"));

    this.testServer.checkContentsOf(
        "legalEntity.json",
        createObjectNode("id", "CompanyXYZ", "lname", "CompanyXYZ"),
        createObjectNode("id", "CompanyUVW", "lname", "CompanyUVW"),
        createObjectNode("id", "CompanyABC", "lname", "CompanyABC"));
  }