@@ -215,29 +215,30 @@ void testEmbeddedResourceWithBlobContentsDeserialization() throws Exception {
215215 @ Test
216216 void testResourceLink () throws Exception {
217217 McpSchema .ResourceLink resourceLink = new McpSchema .ResourceLink ("main.rs" , "file:///project/src/main.rs" ,
218- "Primary application entry point" , "text/x-rust" , null , null );
218+ "Primary application entry point" , "text/x-rust" , null , null , Map . of ( "metaKey" , "metaValue" ) );
219219 String value = mapper .writeValueAsString (resourceLink );
220220
221221 assertThatJson (value ).when (Option .IGNORING_ARRAY_ORDER )
222222 .when (Option .IGNORING_EXTRA_ARRAY_ITEMS )
223223 .isObject ()
224224 .isEqualTo (
225225 json ("""
226- {"type":"resource_link","name":"main.rs","uri":"file:///project/src/main.rs","description":"Primary application entry point","mimeType":"text/x-rust"}""" ));
226+ {"type":"resource_link","name":"main.rs","uri":"file:///project/src/main.rs","description":"Primary application entry point","mimeType":"text/x-rust","_meta":{"metaKey":"metaValue"} }""" ));
227227 }
228228
229229 @ Test
230230 void testResourceLinkDeserialization () throws Exception {
231231 McpSchema .ResourceLink resourceLink = mapper .readValue (
232232 """
233- {"type":"resource_link","name":"main.rs","uri":"file:///project/src/main.rs","description":"Primary application entry point","mimeType":"text/x-rust"}""" ,
233+ {"type":"resource_link","name":"main.rs","uri":"file:///project/src/main.rs","description":"Primary application entry point","mimeType":"text/x-rust","_meta":{"metaKey":"metaValue"} }""" ,
234234 McpSchema .ResourceLink .class );
235235 assertThat (resourceLink ).isNotNull ();
236236 assertThat (resourceLink .type ()).isEqualTo ("resource_link" );
237237 assertThat (resourceLink .name ()).isEqualTo ("main.rs" );
238238 assertThat (resourceLink .uri ()).isEqualTo ("file:///project/src/main.rs" );
239239 assertThat (resourceLink .description ()).isEqualTo ("Primary application entry point" );
240240 assertThat (resourceLink .mimeType ()).isEqualTo ("text/x-rust" );
241+ assertThat (resourceLink .meta ()).containsEntry ("metaKey" , "metaValue" );
241242 }
242243
243244 // JSON-RPC Message Types Tests
@@ -1366,7 +1367,7 @@ void testProgressNotificationWithMessage() throws Exception {
13661367 .isObject ()
13671368 .isEqualTo (
13681369 json ("""
1369- {"progressToken":"progress-token-123","progress":0.5,"total":1.0,"message":"Processing file 1 of 2"} ,"_meta":{"key":"value"}""" ));
1370+ {"progressToken":"progress-token-123","progress":0.5,"total":1.0,"message":"Processing file 1 of 2","_meta":{"key":"value"} }""" ));
13701371 }
13711372
13721373 @ Test
0 commit comments