@Autowired
private HarvestHistoryRepository _repo;
@Test
public void testExecWithHistory() throws Exception {
final ServiceContext context = createServiceContext();
loginAsAdmin(context);
final Element csw = createHarvesterParams("csw");
CswHarvesterIntegrationTest.addCswSpecificParams(csw);
final String id = _harvestManager.addHarvesterReturnId(csw, context.getUserSession().getUserId());
final Element harvesterConfig = _harvestManager.get(id, context, null);
final String harvesterName = "Name";
final String harvesterUuid = Xml.selectString(harvesterConfig, "*//uuid");
final HarvestHistory history = createHistory(harvesterName, harvesterUuid, new ISODate("1980-01-01T10:00:00"));
final HarvestHistory history2 = createHistory(harvesterName, harvesterUuid, new ISODate("1980-02-01T10:00:00"));