// initial insert
SLASummaryBean bean1 = _createSLASummaryBean(wfId1, "RUNNING", EventStatus.START_MISS, new Date(), new Date(),
1000, null, null, 2000, 0, null);
List<JsonBean> list = new ArrayList<JsonBean>();
list.add(bean1);
SLACalculationInsertUpdateJPAExecutor writeCmd = new SLACalculationInsertUpdateJPAExecutor(list, null);
jpaService.execute(writeCmd);
// update existing record and insert another
Date newDate = new Date();
bean1 = new SLASummaryBean();
bean1.setId(wfId1);
bean1.setActualEnd(newDate);
List<JsonBean> updateList = new ArrayList<JsonBean>();
updateList.add(bean1);
SLASummaryBean bean2 = _createSLASummaryBean(wfId2, "RUNNING", EventStatus.END_MISS, new Date(), new Date(),
1000, null, null, 2000, 0, null);
List<JsonBean> insertList = new ArrayList<JsonBean>();
insertList.add(bean2);
writeCmd = new SLACalculationInsertUpdateJPAExecutor(insertList, updateList);
// set fault injection to true, so transaction is roll backed
setSystemProperty(FaultInjection.FAULT_INJECTION, "true");
setSystemProperty(SkipCommitFaultInjection.ACTION_FAILOVER_FAULT_INJECTION, "true");
try {