jobParameters.setActionDefinition("action.data".getBytes());
ScheduleJob scheduleJob = scheduleJobManagementService.createJob(jobParameters);
Assert.assertNotNull(scheduleJob);
ScheduleAction currentScheduleAction = scheduleJob.getAction();
Assert.assertNotNull(currentScheduleAction);
Assert.assertEquals("action.type", currentScheduleAction.getIdentifier());
Assert.assertTrue(Arrays.equals("action.data".getBytes(), currentScheduleAction.getDefinition()));
Assert.assertFalse(currentScheduleAction.isArchived());
ScheduleJobActionParameters actionParameters = new ScheduleJobActionParameters();
actionParameters.setIdentifier("action.type.2");
actionParameters.setDefinition("action.data.2".getBytes());
ScheduleJob scheduleJobModified = scheduleJobManagementService.changeJobAction(scheduleJob.getId(), actionParameters);
Assert.assertNotNull(scheduleJobModified);
ScheduleAction newScheduleAction = scheduleJobModified.getAction();
Assert.assertNotNull(newScheduleAction);
Assert.assertEquals("action.type.2", newScheduleAction.getIdentifier());
Assert.assertTrue(Arrays.equals("action.data.2".getBytes(), newScheduleAction.getDefinition()));
Assert.assertFalse(newScheduleAction.isArchived());
Assert.assertTrue(currentScheduleAction.isArchived());
control.verify();
}