}
@Test
public void testRewriteSandboxDeleted() throws Exception {
final TaskConfig storedTask = defaultTask();
final TaskEvent expectedEvent = new TaskEvent(100, FINISHED);
storage.write(new Storage.MutateWork.NoResult.Quiet() {
@Override
protected void execute(Storage.MutableStoreProvider storeProvider) {
storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(
IScheduledTask.build(new ScheduledTask()
.setStatus(SANDBOX_DELETED)
.setTaskEvents(ImmutableList.of(expectedEvent, new TaskEvent(200, SANDBOX_DELETED)))
.setAssignedTask(new AssignedTask()
.setTaskId(TASK_ID)
.setInstanceId(0)
.setTask(storedTask)))));
}