Job implements Serializable, JobInfo { public int getCountDomains() { return domainConfigurationMap.size(); } protected  Job();  Job(Long harvestID, DomainConfiguration cfg, HeritrixTemplate orderXMLdoc, HarvestChannel channel,
            long forceMaxObjectsPerDomain,
            long forceMaxBytesPerDomain, long forceMaxJobRunningTime, int harvestNum);   Job(Long harvestID, Map<String, String> configurations, String channel, boolean snapshot,
            long forceMaxObjectsPerDomain, long forceMaxBytesPerDomain, long forceMaxJobRunningTime, JobStatus status,
            String orderXMLname, HeritrixTemplate orderXMLdoc, String seedlist, int harvestNum, Long continuationOf); void setAttributes(List<AttributeAndType> attributesAndTypes); void addConfiguration(DomainConfiguration cfg); String getOrderXMLName(); Date getActualStop(); Date getActualStart(); Date getSubmittedDate(); Date getCreationDate(); File[] getSettingsXMLfiles(); Long getOrigHarvestDefinitionID(); Long getJobID(); void setJobID(Long id); int getCountDomains(); void setActualStart(Date actualStart); void setActualStop(Date actualStop); void setOrderXMLDoc(HeritrixTemplate doc); HeritrixTemplate getOrderXMLdoc(); void setSeedList(String seedList); String getSeedListAsString(); JobStatus getStatus(); void setStatus(JobStatus newStatus); Map<String, String> getDomainConfigurationMap(); long getMaxObjectsPerDomain(); long getMaxBytesPerDomain(); void setHarvestChannel(HarvestChannel harvestChannel); String getChannel(); void setChannel(String channel); boolean isSnapshot(); void setSnapshot(boolean isSnapshot); @Override String toString(); long getForceMaxObjectsPerDomain(); long getMaxJobRunningTime(); int getHarvestNum(); void setHarvestNum(int harvestNum); String getHarvestErrors(); void appendHarvestErrors(String harvestErrors); String getHarvestErrorDetails(); void appendHarvestErrorDetails(String harvestErrorDetails); String getUploadErrors(); void appendUploadErrors(String uploadErrors); String getUploadErrorDetails(); void appendUploadErrorDetails(String uploadErrorDetails); Long getResubmittedAsJob(); void setSubmittedDate(Date submittedDate); void setCreationDate(Date creationDate); void setResubmittedAsJob(Long resubmittedAsJob); Long getContinuationOf(); @Override String getHarvestFilenamePrefix(); void setHarvestFilenamePrefix(String prefix); long getForceMaxBytesPerDomain(); boolean isConfigurationSetsObjectLimit(); boolean isConfigurationSetsByteLimit(); long getMinCountObjects(); long getMaxCountObjects(); long getTotalCountObjects(); String getHarvestAudience(); void setHarvestAudience(String theAudience); List<String> getSortedSeedList();  }
@Test public void testExceedLimitsInInitialConfiguration() { DomainConfiguration domainConfiguration = DomainConfigurationTest.createDefaultDomainConfiguration(); HarvestInfo hi = new HarvestInfo(1L, domainConfiguration.getDomainName(), domainConfiguration.getName(), new Date(), 10000L, 10000L, StopReason.DOWNLOAD_COMPLETE); domainConfiguration.getDomainhistory().addHarvestInfo(hi); Job job = createDefaultJob(domainConfiguration); assertEquals("First configuration should be accepted", 1, job.getCountDomains()); }