18
18
import static org .assertj .core .api .Assertions .*;
19
19
import static org .mockito .Mockito .*;
20
20
21
- import java .util .List ;
21
+ import java .util .Arrays ;
22
22
23
23
import org .assertj .core .api .InstanceOfAssertFactories ;
24
24
import org .junit .jupiter .api .Test ;
27
27
28
28
/**
29
29
* @author Christoph Strobl
30
+ * @author Julia Lee
30
31
*/
31
32
public class AggregationOperationRendererUnitTests {
32
33
@@ -37,7 +38,7 @@ void nonFieldsExposingAggregationOperationContinuesWithSameContextForNextStage()
37
38
AggregationOperation stage1 = mock (AggregationOperation .class );
38
39
AggregationOperation stage2 = mock (AggregationOperation .class );
39
40
40
- AggregationOperationRenderer .toDocument (List . of (stage1 , stage2 ), rootContext );
41
+ AggregationOperationRenderer .toDocument (Arrays . asList (stage1 , stage2 ), rootContext );
41
42
42
43
verify (stage1 ).toPipelineStages (eq (rootContext ));
43
44
verify (stage2 ).toPipelineStages (eq (rootContext ));
@@ -54,7 +55,7 @@ void fieldsExposingAggregationOperationNotExposingFieldsForcesUseOfDefaultContex
54
55
when (stage1 .getFields ()).thenReturn (stage1fields );
55
56
when (stage1fields .exposesNoFields ()).thenReturn (true );
56
57
57
- AggregationOperationRenderer .toDocument (List . of (stage1 , stage2 ), rootContext );
58
+ AggregationOperationRenderer .toDocument (Arrays . asList (stage1 , stage2 ), rootContext );
58
59
59
60
verify (stage1 ).toPipelineStages (eq (rootContext ));
60
61
verify (stage2 ).toPipelineStages (eq (AggregationOperationRenderer .DEFAULT_CONTEXT ));
@@ -73,7 +74,7 @@ void fieldsExposingAggregationOperationForcesNewContextForNextStage() {
73
74
74
75
ArgumentCaptor <AggregationOperationContext > captor = ArgumentCaptor .forClass (AggregationOperationContext .class );
75
76
76
- AggregationOperationRenderer .toDocument (List . of (stage1 , stage2 ), rootContext );
77
+ AggregationOperationRenderer .toDocument (Arrays . asList (stage1 , stage2 ), rootContext );
77
78
78
79
verify (stage1 ).toPipelineStages (eq (rootContext ));
79
80
verify (stage2 ).toPipelineStages (captor .capture ());
@@ -98,7 +99,7 @@ void inheritingFieldsExposingAggregationOperationForcesNewContextForNextStageKee
98
99
99
100
ArgumentCaptor <AggregationOperationContext > captor = ArgumentCaptor .forClass (AggregationOperationContext .class );
100
101
101
- AggregationOperationRenderer .toDocument (List . of (stage1 , stage2 , stage3 ), rootContext );
102
+ AggregationOperationRenderer .toDocument (Arrays . asList (stage1 , stage2 , stage3 ), rootContext );
102
103
103
104
verify (stage1 ).toPipelineStages (captor .capture ());
104
105
verify (stage2 ).toPipelineStages (captor .capture ());
0 commit comments