ScheduledTask scheduledTask = new ScheduledTask()
.setStatus(status)
.setTaskEvents(ImmutableList.of(new TaskEvent(100, status)))
.setAssignedTask(new AssignedTask()
.setTaskId(id)
.setTask(new TaskConfig()
.setJobName("job-" + id)
.setEnvironment("test")
.setExecutorConfig(new org.apache.aurora.gen.ExecutorConfig("AuroraExecutor", ""))
.setOwner(new Identity("role-" + id, "user-" + id))));
// Apply defaults here so that we can expect the same task that will be written to the stream.