33import com .embabel .agent .api .common .autonomy .AgentInvocation ;
44import com .embabel .agent .domain .io .UserInput ;
55import com .embabel .agent .testing .integration .EmbabelMockitoIntegrationTest ;
6- import org .junit .jupiter .api .Test ;
76import org .junit .jupiter .api .BeforeAll ;
7+ import org .junit .jupiter .api .Test ;
88
99import static org .junit .jupiter .api .Assertions .*;
1010
@@ -25,17 +25,17 @@ static void setUp() {
2525 void shouldExecuteCompleteWorkflow () {
2626 var input = new UserInput ("Write about artificial intelligence" );
2727
28- var story = new Story ("AI will transform our world..." );
29- var reviewedStory = new ReviewedStory (story , "Excellent exploration of AI themes." , Personas .REVIEWER );
28+ var story = new WriteAndReviewAgent . Story ("AI will transform our world..." );
29+ var reviewedStory = new WriteAndReviewAgent . ReviewedStory (story , "Excellent exploration of AI themes." , Personas .REVIEWER );
3030
31- whenCreateObject (prompt -> prompt .contains ("Craft a short story" ), Story .class )
31+ whenCreateObject (prompt -> prompt .contains ("Craft a short story" ), WriteAndReviewAgent . Story .class )
3232 .thenReturn (story );
3333
3434 // The second call uses generateText
3535 whenGenerateText (prompt -> prompt .contains ("You will be given a short story to review" ))
3636 .thenReturn (reviewedStory .review ());
3737
38- var invocation = AgentInvocation .create (agentPlatform , ReviewedStory .class );
38+ var invocation = AgentInvocation .create (agentPlatform , WriteAndReviewAgent . ReviewedStory .class );
3939 var reviewedStoryResult = invocation .invoke (input );
4040
4141 assertNotNull (reviewedStoryResult );
@@ -44,7 +44,7 @@ void shouldExecuteCompleteWorkflow() {
4444 assertEquals (reviewedStory , reviewedStoryResult ,
4545 "Expected review to match: " + reviewedStoryResult );
4646
47- verifyCreateObjectMatching (prompt -> prompt .contains ("Craft a short story" ), Story .class ,
47+ verifyCreateObjectMatching (prompt -> prompt .contains ("Craft a short story" ), WriteAndReviewAgent . Story .class ,
4848 llm -> llm .getLlm ().getTemperature () == 0.7 && llm .getToolGroups ().isEmpty ());
4949 verifyGenerateTextMatching (prompt -> prompt .contains ("You will be given a short story to review" ));
5050 verifyNoMoreInteractions ();
0 commit comments