final List<ViewCycleExecutionOptions> cycles = new ArrayList<ViewCycleExecutionOptions>(20);
for (int i = 0; i < 20; i++) {
cycles.add(ViewCycleExecutionOptions.builder().setValuationTime(t.plusSeconds(i)).create());
}
final ViewCycleExecutionSequence sequence = new ArbitraryViewCycleExecutionSequence(cycles);
final ViewExecutionOptions options = ExecutionOptions.of(sequence, EnumSet.of(ViewExecutionFlags.RUN_AS_FAST_AS_POSSIBLE));
test.createWorker(Mockito.mock(ViewProcessWorkerContext.class), options, Mockito.mock(ViewDefinition.class));
assertEquals(underlying._executionOptions.size(), 3);
for (ViewExecutionOptions spawned : underlying._executionOptions) {
assertEquals(spawned.getDefaultExecutionOptions(), options.getDefaultExecutionOptions());
assertEquals(spawned.getFlags(), options.getFlags());
assertEquals(spawned.getMaxSuccessiveDeltaCycles(), options.getMaxSuccessiveDeltaCycles());
}
assertEquals(underlying._executionOptions.get(0).getExecutionSequence().estimateRemaining(), 8);
assertEquals(underlying._executionOptions.get(1).getExecutionSequence().estimateRemaining(), 8);
assertEquals(underlying._executionOptions.get(2).getExecutionSequence().estimateRemaining(), 4);
}