InstanceFlowServiceImpl implements InstanceFlowService { @Override public int[] batchInsert(List<InstanceFlow> entityList) { return instanceFlowDao.batchInsert(entityList); }  @Override int[] batchInsert(List<InstanceFlow> entityList); int cleanHistory(Date minKeepTime); @Override List<InstanceFlow> getByQuery(InstanceFlowQuery query); @Override List<InstanceFlow> getRecentInstances(Date startCreateTime, String status); @Override List<LoopRate> getLoopRates(Date date0, Date date1, Date date2);  }
@Test public void testBatchInsert(){ List<InstanceFlow> instanceList = new ArrayList<InstanceFlow>(); for (int i=0; i<10; i++) { InstanceFlow instance = new InstanceFlow(); instance.setInstanceFlowId(UUID.randomUUID().toString().replace("-", "")); instance.setSourceTaskId(100); instance.setInitTime(new Date()); instance.setStartTime(new Date()); instance.setEndTime(new Date()); instance.setStatus(ExecStatus.Success.name()); instance.setLog(null); instanceList.add(instance); } instanceFlowService.batchInsert(instanceList); }