@Test
public void testForceMaxObjectsPerDomain() {

    // test capping of forceMaxObjectsPerDomain:
    DomainConfiguration domainConfiguration = DomainConfigurationTest.createDefaultDomainConfiguration();
    Job job = createDefaultJob(domainConfiguration);
    assertEquals("forceMaxObjectsPerDomain not capped to domain config",
            domainConfiguration.getMaxObjects(),
            job.getForceMaxObjectsPerDomain());
    // check if updated in the Document object that the Job object holds:
    // xpath-expression that selects the appropriate node in order.xml:
    final String xpath = "/crawl-order/controller/map[@name='pre-fetch-processors']"
            + "/newObject[@name='QuotaEnforcer']" + "/long[@name='group-max-fetch-successes']";
    // FIXME only works for H1
      Document orderXML = job.getOrderXMLdoc();
      Node groupMaxFetchSuccessNode = orderXML.selectSingleNode(xpath);
      long maxObjectsXML = Long.parseLong(groupMaxFetchSuccessNode.getText());
      assertEquals("The order.xml Document should have been updated", domainConfiguration.getMaxObjects(),
              maxObjectsXML);
}