@@ -174,6 +174,15 @@ public void testParallel() throws ExecutionException, InterruptedException {
174
174
Map <String , String > topic = new HashMap <>();
175
175
topic .put ("style" , "sci-fi" );
176
176
177
+ try (WorkflowApplication app = WorkflowApplication .builder ().build ()) {
178
+ Map <String , Object > result =
179
+ app .workflowDefinition (workflow ).instance (topic ).start ().get ().asMap ().orElseThrow ();
180
+
181
+ assertEquals ("Fake conflict response" , result .get ("setting" ).toString ());
182
+ assertEquals ("Fake hero response" , result .get ("hero" ).toString ());
183
+ assertEquals ("Fake setting response" , result .get ("conflict" ).toString ());
184
+ }
185
+
177
186
try (WorkflowApplication app = WorkflowApplication .builder ().build ()) {
178
187
AgenticScope result =
179
188
app .workflowDefinition (workflow )
@@ -183,9 +192,9 @@ public void testParallel() throws ExecutionException, InterruptedException {
183
192
.as (AgenticScope .class )
184
193
.orElseThrow ();
185
194
186
- assertEquals ("Fake conflict response" , result .readState ("setting" ));
187
- assertEquals ("Fake hero response" , result .readState ("hero" ));
188
- assertEquals ("Fake setting response" , result .readState ("conflict" ));
195
+ assertEquals ("Fake conflict response" , result .readState ("setting" ). toString () );
196
+ assertEquals ("Fake hero response" , result .readState ("hero" ). toString () );
197
+ assertEquals ("Fake setting response" , result .readState ("conflict" ). toString () );
189
198
}
190
199
}
191
200
@@ -223,6 +232,14 @@ public void testSeqAndThenParallel() throws ExecutionException, InterruptedExcep
223
232
Map <String , String > topic = new HashMap <>();
224
233
topic .put ("fact" , "alien" );
225
234
235
+ try (WorkflowApplication app = WorkflowApplication .builder ().build ()) {
236
+ Map <String , Object > result =
237
+ app .workflowDefinition (workflow ).instance (topic ).start ().get ().asMap ().orElseThrow ();
238
+
239
+ assertEquals (cultureTraits , result .get ("culture" ));
240
+ assertEquals (technologyTraits , result .get ("technology" ));
241
+ }
242
+
226
243
try (WorkflowApplication app = WorkflowApplication .builder ().build ()) {
227
244
AgenticScope result =
228
245
app .workflowDefinition (workflow )
0 commit comments