List<JobInstance> jobInstances = dao.getJobInstances(multiInstanceJob, startIndex, queryCount);
assertEquals(queryCount, jobInstances.size());
for (int i = 0; i < queryCount; i++) {
JobInstance returnedInstance = jobInstances.get(i);
assertEquals(multiInstanceJob, returnedInstance.getJobName());
assertEquals(Integer.valueOf(0), returnedInstance.getVersion());
//checks the correct instances are returned and the order is descending
// assertEquals(instanceCount - startIndex - i , returnedInstance.getJobParameters().getLong(paramKey));
}