@Test
public void testAddConfigurationUpdatesOrderXml() {

    // Make a configuration with no crawlertraps
    DomainConfiguration dc1 = DomainConfigurationTest.createDefaultDomainConfiguration();
    // Make a configuration with two crawlertraps
    DomainConfiguration dc2 = DomainConfigurationTest.createDefaultDomainConfiguration("otherDomain.org");
    List<String> traps = new ArrayList<>();
    String crawlerTrap1 = "xyz.*";
    String crawlerTrap2 = ".*[a-z]+";
    traps.add(crawlerTrap1);
    traps.add(crawlerTrap2);
    dc2.setCrawlertraps(traps);
    // Make a job with the two configurations
    Job job = createDefaultJob(dc1);
    job.addConfiguration(dc2);
    // Check that there are no crawlertraps for the first domain and exactly
    // the right two in the second domain
    String domain1CrawlerTrapsXpath = "/crawl-order/controller/newObject[@name='scope']/newObject[@class='"
            + Heritrix1Constants.DECIDERULESEQUENCE_CLASSNAME + "']/map[@name='rules']/"
            + "/newObject[@name='" + dc1.getDomainName()
            + "'][@class='" + Heritrix1Constants.MATCHESLISTREGEXPDECIDERULE_CLASSNAME + "']";
    String domain2CrawlerTrapsXpath = "/crawl-order/controller/newObject[@name='scope']/newObject[@class='"
            + Heritrix1Constants.DECIDERULESEQUENCE_CLASSNAME + "']/map[@name='rules']/"
            + "/newObject[@name='" + dc2.getDomainName()
            + "'][@class='" + Heritrix1Constants.MATCHESLISTREGEXPDECIDERULE_CLASSNAME + "']";
    //FIXME test only appropriate for H1 templates 
    /*
    job.getOrderXMLdoc().normalize();
    List<Node> nodes = job.getOrderXMLdoc().selectNodes(domain1CrawlerTrapsXpath);
    assertFalse("There shouldn't be any crawler traps for domain '" + dc1.getDomainName() + "'", nodes.size() != 0);
    nodes = job.getOrderXMLdoc().selectNodes(domain2CrawlerTrapsXpath);
    assertTrue("There should be crawler traps for domain '" + dc2.getDomainName() + "'", nodes.size() == 1);
    Node regexpListDeciderule = nodes.get(0);
    */
    // TODO add checks for
    // <string name="decision">REJECT</string>
    // <string name="list-logic">OR</string>
    /*
     * FIXME test only appropriate for H1 templates
 
    nodes = regexpListDeciderule.selectNodes("stringList[@name='regexp-list']/string");
    Set<String> regexpFound = new HashSet<String>();
    for (Node n : nodes) {
        String regexp = n.getText();
        regexpFound.add(regexp);
    }
    int found = regexpFound.size();
    assertTrue("Must only contain two regexp, but found " + found + "(" + regexpFound.toArray().toString() + ")",
            found == 2);
    assertTrue("Must contain regexp '" + crawlerTrap1 + "'.", regexpFound.contains(crawlerTrap1));
    assertTrue("Must contain regexp '" + crawlerTrap2 + "'.", regexpFound.contains(crawlerTrap2));
    */
    
    
}