### Question:
ProcessingJobDaoImpl implements ProcessingJobDao { @Override public List<ProcessingJob> getJobsWithState(JobState jobState, Page page) { final Query<ProcessingJob> query = datastore.find(ProcessingJob.class); query.criteria("state").equal(jobState); query.offset(page.getFrom()); query.limit(page.getLimit()); return query.asList(); } ProcessingJobDaoImpl(Datastore datastore); @Override Long getCount(); @Override boolean create(ProcessingJob processingJob, WriteConcern writeConcern); @Override com.google.code.morphia.Key<ProcessingJob> createOrModify(
			ProcessingJob processingJobs, WriteConcern writeConcern); @Override Iterable<com.google.code.morphia.Key<ProcessingJob>> createOrModify(
			Collection<ProcessingJob> processingJobs, WriteConcern writeConcern); @Override ProcessingJob read(String id); @Override boolean update(ProcessingJob processingJob, WriteConcern writeConcern); @Override WriteResult delete(String id); @Override List<ProcessingJob> getJobsWithState(JobState jobState, Page page); @Override void modifyStateOfJobsWithIds(JobState newJobState,
			final List<String> jobIds); @Override void modifyStateOfJobs(JobState oldJobState, JobState newJobState); Map<String, Integer> getIpDistribution(); @Override List<ProcessingJob> getDiffusedJobsWithState(
			JobPriority jobPriority, JobState jobState, Page page,
			Map<String, Integer> ipDistribution); @Override List<ProcessingJob> deactivateJobs(final ReferenceOwner owner,
			final WriteConcern writeConcern); @Override PagedElements<ProcessingJob> findJobsByCollectionIdAndState(
			final Set<String> collectionIds, final Set<JobState> states,
			final Page pageConfiguration); @Override Map<String, JobStatistics> findJobsByCollectionId(String collectionId);  }### Answer:
@Test public void testGetJobsWithState() throws Exception { final ProcessingJob processingJob = new ProcessingJob(1, new Date(), new ReferenceOwner("1", "1", "1"), null, JobState.READY, null, "", null); processingJobDao.create(processingJob, WriteConcern.NONE); List<ProcessingJob> allJobs = processingJobDao.getJobsWithState(JobState.READY, new Page(0, 1)); assertNotNull(allJobs); processingJobDao.delete(processingJob.getId()); }