@@ -103,7 +103,7 @@ public void testA2AClientSendMessage() throws Exception {
103103
104104 JSONRPCTransport client = new JSONRPCTransport ("http://localhost:4001" );
105105 Message message = Message .builder ()
106- .role (Message .Role .USER )
106+ .role (Message .Role .ROLE_USER )
107107 .parts (Collections .singletonList (new TextPart ("tell me a joke" )))
108108 .contextId ("context-1234" )
109109 .messageId ("message-1234" )
@@ -151,7 +151,7 @@ public void testA2AClientSendMessageWithMessageResponse() throws Exception {
151151
152152 JSONRPCTransport client = new JSONRPCTransport ("http://localhost:4001" );
153153 Message message = Message .builder ()
154- .role (Message .Role .USER )
154+ .role (Message .Role .ROLE_USER )
155155 .parts (Collections .singletonList (new TextPart ("tell me a joke" )))
156156 .contextId ("context-1234" )
157157 .messageId ("message-1234" )
@@ -168,7 +168,7 @@ public void testA2AClientSendMessageWithMessageResponse() throws Exception {
168168 EventKind result = client .sendMessage (params , null );
169169 assertInstanceOf (Message .class , result );
170170 Message agentMessage = (Message ) result ;
171- assertEquals (Message .Role .AGENT , agentMessage .role ());
171+ assertEquals (Message .Role .ROLE_AGENT , agentMessage .role ());
172172 Part <?> part = agentMessage .parts ().get (0 );
173173 assertTrue (part instanceof TextPart );
174174 assertEquals ("Why did the chicken cross the road? To get to the other side!" , ((TextPart ) part ).text ());
@@ -193,7 +193,7 @@ public void testA2AClientSendMessageWithError() throws Exception {
193193
194194 JSONRPCTransport client = new JSONRPCTransport ("http://localhost:4001" );
195195 Message message = Message .builder ()
196- .role (Message .Role .USER )
196+ .role (Message .Role .ROLE_USER )
197197 .parts (Collections .singletonList (new TextPart ("tell me a joke" )))
198198 .contextId ("context-1234" )
199199 .messageId ("message-1234" )
@@ -248,7 +248,7 @@ public void testA2AClientGetTask() throws Exception {
248248 assertNotNull (history );
249249 assertEquals (1 , history .size ());
250250 Message message = history .get (0 );
251- assertEquals (Message .Role .USER , message .role ());
251+ assertEquals (Message .Role .ROLE_USER , message .role ());
252252 List <Part <?>> parts = message .parts ();
253253 assertNotNull (parts );
254254 assertEquals (3 , parts .size ());
@@ -435,7 +435,7 @@ public void testA2AClientSendMessageWithFilePart() throws Exception {
435435
436436 JSONRPCTransport client = new JSONRPCTransport ("http://localhost:4001" );
437437 Message message = Message .builder ()
438- .role (Message .Role .USER )
438+ .role (Message .Role .ROLE_USER )
439439 .parts (List .of (
440440 new TextPart ("analyze this image" ),
441441 new FilePart (new FileWithUri ("image/jpeg" , null , "file:///path/to/image.jpg" ))
@@ -495,7 +495,7 @@ public void testA2AClientSendMessageWithDataPart() throws Exception {
495495 data .put ("timestamp" , "2024-01-15T10:30:00Z" );
496496
497497 Message message = Message .builder ()
498- .role (Message .Role .USER )
498+ .role (Message .Role .ROLE_USER )
499499 .parts (List .of (
500500 new TextPart ("process this data" ),
501501 new DataPart (data )
@@ -552,7 +552,7 @@ public void testA2AClientSendMessageWithMixedParts() throws Exception {
552552 data .put ("labels" , List .of ("Q1" , "Q2" , "Q3" , "Q4" ));
553553
554554 Message message = Message .builder ()
555- .role (Message .Role .USER )
555+ .role (Message .Role .ROLE_USER )
556556 .parts (List .of (
557557 new TextPart ("analyze this data and image" ),
558558 new FilePart (new FileWithBytes ("image/png" , "chart.png" , "aGVsbG8=" )),
@@ -617,7 +617,7 @@ public void testExtensionSupportRequiredErrorUnmarshalling() throws Exception {
617617
618618 JSONRPCTransport client = new JSONRPCTransport ("http://localhost:4001" );
619619 Message message = Message .builder ()
620- .role (Message .Role .USER )
620+ .role (Message .Role .ROLE_USER )
621621 .parts (Collections .singletonList (new TextPart ("test message" )))
622622 .contextId ("context-test" )
623623 .messageId ("message-test" )
@@ -673,7 +673,7 @@ public void testVersionNotSupportedErrorUnmarshalling() throws Exception {
673673
674674 JSONRPCTransport client = new JSONRPCTransport ("http://localhost:4001" );
675675 Message message = Message .builder ()
676- .role (Message .Role .USER )
676+ .role (Message .Role .ROLE_USER )
677677 .parts (Collections .singletonList (new TextPart ("test message" )))
678678 .contextId ("context-test" )
679679 .messageId ("message-test" )
0 commit comments