}
@Transactional
private RequestExecution createRequestSchedule() throws Exception {
Batch batches = new Batch();
Schedule schedule = new Schedule();
BatchSettings batchSettings = new BatchSettings();
batchSettings.setTaskFailureToleranceLimit(10);
batches.setBatchSettings(batchSettings);
List<BatchRequest> batchRequests = new ArrayList<BatchRequest>();
BatchRequest batchRequest1 = new BatchRequest();
batchRequest1.setOrderId(10L);
batchRequest1.setType(BatchRequest.Type.DELETE);
batchRequest1.setUri("testUri1");
BatchRequest batchRequest2 = new BatchRequest();
batchRequest2.setOrderId(12L);
batchRequest2.setType(BatchRequest.Type.POST);
batchRequest2.setUri("testUri2");
batchRequest2.setBody("testBody");
batchRequests.add(batchRequest1);
batchRequests.add(batchRequest2);
batches.getBatchRequests().addAll(batchRequests);
schedule.setMinutes("10");
schedule.setEndTime("2014-01-01 00:00:00");
RequestExecution requestExecution = requestExecutionFactory.createNew
(cluster, batches, schedule);
requestExecution.setStatus(RequestExecution.Status.SCHEDULED);