*/
@Test
public void testGetJobExecutionsForJobInstance() throws Exception {
String jobName = "job";
Long jobInstanceId = 12L;
JobInstance jobInstance = MetaDataInstanceFactory.createJobInstance(jobName, jobInstanceId);
EasyMock.expect(jobLocator.getJobNames()).andReturn(Collections.<String> emptyList());
EasyMock.expect(jobInstanceDao.countJobInstances(jobName)).andReturn(1);
EasyMock.expect(jobInstanceDao.getJobInstance(jobInstanceId)).andReturn(jobInstance);
JobExecution jobExecution = MetaDataInstanceFactory.createJobExecution();
EasyMock.expect(jobExecutionDao.findJobExecutions(jobInstance)).andReturn(Arrays.asList(jobExecution));
stepExecutionDao.addStepExecutions(jobExecution);
EasyMock.expectLastCall();
EasyMock.replay(jobLocator, jobInstanceDao, stepExecutionDao, jobExecutionDao);
assertEquals(1, service.getJobExecutionsForJobInstance("job", jobInstance.getId()).size());
EasyMock.verify(jobLocator, jobInstanceDao, stepExecutionDao, jobExecutionDao);
}