Snapshot snapshotContents = new Snapshot()
.setTimestamp(NOW)
.setTasks(ImmutableSet.of(
new ScheduledTask()
.setStatus(ScheduleStatus.RUNNING)
.setAssignedTask(new AssignedTask().setTaskId("task_id"))));
expect(snapshotStore.createSnapshot()).andReturn(snapshotContents);
streamMatcher.expectSnapshot(snapshotContents).andReturn(position);
stream.truncateBefore(position);
final Capture<MutateWork<Void, RuntimeException>> snapshotWork = createCapture();
expect(storageUtil.storage.write(capture(snapshotWork))).andAnswer(