@@ -81,8 +81,8 @@ void testTaskWithArtifacts() throws JsonProcessingException {
8181 .name ("Test Artifact" )
8282 .description ("Description of artifact" )
8383 .parts (List .of (
84- new TextPart ("Hello" ),
85- new TextPart ("World" )
84+ new TextPart ("Hello" , null ),
85+ new TextPart ("World" , null )
8686 ))
8787 .build ();
8888
@@ -115,7 +115,7 @@ void testTaskWithArtifacts() throws JsonProcessingException {
115115 void testTaskWithHistory () throws JsonProcessingException {
116116 Message message = Message .builder ()
117117 .role (Message .Role .USER )
118- .parts (List .of (new TextPart ("Test message" )))
118+ .parts (List .of (new TextPart ("Test message" , null )))
119119 .build ();
120120
121121 Task task = Task .builder ()
@@ -153,17 +153,17 @@ void testTaskWithAllFields() throws JsonProcessingException {
153153 .history (List .of (
154154 Message .builder ()
155155 .role (Message .Role .USER )
156- .parts (List .of (new TextPart ("User message" )))
156+ .parts (List .of (new TextPart ("User message" , null )))
157157 .build (),
158158 Message .builder ()
159159 .role (Message .Role .AGENT )
160- .parts (List .of (new TextPart ("Agent response" )))
160+ .parts (List .of (new TextPart ("Agent response" , null )))
161161 .build ()
162162 ))
163163 .artifacts (List .of (
164164 Artifact .builder ()
165165 .artifactId ("artifact-1" )
166- .parts (List .of (new TextPart ("Artifact content" )))
166+ .parts (List .of (new TextPart ("Artifact content" , null )))
167167 .build ()
168168 ))
169169 .metadata (Map .of ("key1" , "value1" , "key2" , 42 ))
@@ -238,7 +238,7 @@ void testTaskWithNullOptionalFields() throws JsonProcessingException {
238238
239239 @ Test
240240 void testTaskWithFilePartBytes () throws JsonProcessingException {
241- FilePart filePart = new FilePart (new FileWithBytes ("application/pdf" , "document.pdf" , "base64data" ));
241+ FilePart filePart = new FilePart (new FileWithBytes ("application/pdf" , "document.pdf" , "base64data" ), null );
242242
243243 Artifact artifact = Artifact .builder ()
244244 .artifactId ("file-artifact" )
@@ -276,7 +276,7 @@ void testTaskWithFilePartBytes() throws JsonProcessingException {
276276
277277 @ Test
278278 void testTaskWithFilePartUri () throws JsonProcessingException {
279- FilePart filePart = new FilePart (new FileWithUri ("image/png" , "photo.png" , "https://example.com/photo.png" ));
279+ FilePart filePart = new FilePart (new FileWithUri ("image/png" , "photo.png" , "https://example.com/photo.png" ), null );
280280
281281 Artifact artifact = Artifact .builder ()
282282 .artifactId ("uri-artifact" )
@@ -311,7 +311,7 @@ void testTaskWithFilePartUri() throws JsonProcessingException {
311311
312312 @ Test
313313 void testTaskWithDataPart () throws JsonProcessingException {
314- DataPart dataPart = new DataPart (Map .of ("temperature" , 22.5 , "humidity" , 65 ));
314+ DataPart dataPart = new DataPart (Map .of ("temperature" , 22.5 , "humidity" , 65 ), null );
315315
316316 Artifact artifact = Artifact .builder ()
317317 .artifactId ("data-artifact" )
@@ -356,16 +356,16 @@ void testTaskRoundTrip() throws JsonProcessingException {
356356 Message .builder ()
357357 .role (Message .Role .USER )
358358 .parts (List .of (
359- new TextPart ("Text" ),
360- new FilePart (new FileWithBytes ("text/plain" , "file.txt" , "data" )),
361- new DataPart (Map .of ("key" , "value" ))
359+ new TextPart ("Text" , null ),
360+ new FilePart (new FileWithBytes ("text/plain" , "file.txt" , "data" ), null ),
361+ new DataPart (Map .of ("key" , "value" ), null )
362362 ))
363363 .build ()
364364 ))
365365 .artifacts (List .of (
366366 Artifact .builder ()
367367 .artifactId ("artifact-1" )
368- .parts (List .of (new TextPart ("Content" )))
368+ .parts (List .of (new TextPart ("Content" , null )))
369369 .build ()
370370 ))
371371 .metadata (Map .of ("meta1" , "value1" ))
@@ -395,7 +395,7 @@ void testTaskRoundTrip() throws JsonProcessingException {
395395 void testTaskStatusWithMessage () throws JsonProcessingException {
396396 Message statusMessage = Message .builder ()
397397 .role (Message .Role .AGENT )
398- .parts (List .of (new TextPart ("Processing complete" )))
398+ .parts (List .of (new TextPart ("Processing complete" , null )))
399399 .build ();
400400
401401 Task task = Task .builder ()
@@ -682,10 +682,10 @@ void testTaskWithMixedPartTypes() throws JsonProcessingException {
682682 Artifact artifact = Artifact .builder ()
683683 .artifactId ("mixed-artifact" )
684684 .parts (List .of (
685- new TextPart ("Text content" ),
686- new FilePart (new FileWithBytes ("application/json" , "data.json" , "{}" )),
687- new DataPart (Map .of ("result" , 42 )),
688- new FilePart (new FileWithUri ("image/png" , "image.png" , "https://example.com/img.png" ))
685+ new TextPart ("Text content" , null ),
686+ new FilePart (new FileWithBytes ("application/json" , "data.json" , "{}" ), null ),
687+ new DataPart (Map .of ("result" , 42 ), null ),
688+ new FilePart (new FileWithUri ("image/png" , "image.png" , "https://example.com/img.png" ), null )
689689 ))
690690 .build ();
691691
0 commit comments