@@ -121,7 +121,11 @@ public void canSpawnMoreEngines() {
121
121
122
122
doReturn (mock (FlutterEngine .class ))
123
123
.when (firstEngine )
124
- .spawn (any (Context .class ), any (DartEntrypoint .class ), nullable (String .class ));
124
+ .spawn (
125
+ any (Context .class ),
126
+ any (DartEntrypoint .class ),
127
+ nullable (String .class ),
128
+ nullable (Object .class ));
125
129
126
130
FlutterEngine secondEngine =
127
131
engineGroupUnderTest .createAndRunEngine (
@@ -133,7 +137,11 @@ public void canSpawnMoreEngines() {
133
137
134
138
// Now the second spawned engine is the only one left and it will be called to spawn the next
135
139
// engine in the chain.
136
- when (secondEngine .spawn (any (Context .class ), any (DartEntrypoint .class ), nullable (String .class )))
140
+ when (secondEngine .spawn (
141
+ any (Context .class ),
142
+ any (DartEntrypoint .class ),
143
+ nullable (String .class ),
144
+ nullable (Object .class )))
137
145
.thenReturn (mock (FlutterEngine .class ));
138
146
139
147
FlutterEngine thirdEngine =
@@ -156,7 +164,8 @@ public void canCreateAndRunCustomEntrypoints() {
156
164
eq ("some/path/to/flutter_assets" ),
157
165
eq ("other entrypoint" ),
158
166
isNull (String .class ),
159
- any (AssetManager .class ));
167
+ any (AssetManager .class ),
168
+ nullable (Object .class ));
160
169
}
161
170
162
171
@ Test
@@ -176,14 +185,18 @@ public void canCreateAndRunWithCustomInitialRoute() {
176
185
doAnswer (invocation -> jniAttached = true ).when (secondMockflutterJNI ).attachToNative ();
177
186
doReturn (secondMockflutterJNI )
178
187
.when (mockflutterJNI )
179
- .spawn (nullable (String .class ), nullable (String .class ), nullable (String .class ));
188
+ .spawn (
189
+ nullable (String .class ),
190
+ nullable (String .class ),
191
+ nullable (String .class ),
192
+ nullable (Object .class ));
180
193
181
194
FlutterEngine secondEngine =
182
195
engineGroupUnderTest .createAndRunEngine (
183
196
RuntimeEnvironment .application , mock (DartEntrypoint .class ), "/bar" );
184
197
185
198
assertEquals (2 , engineGroupUnderTest .activeEngines .size ());
186
199
verify (mockflutterJNI , times (1 ))
187
- .spawn (nullable (String .class ), nullable (String .class ), eq ("/bar" ));
200
+ .spawn (nullable (String .class ), nullable (String .class ), eq ("/bar" ), nullable ( Object . class ) );
188
201
}
189
202
}
0 commit comments