File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
mcp-test/src/main/java/io/modelcontextprotocol/client Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -486,7 +486,8 @@ void testAddRoot() {
486486 void testAddRootWithNullValue () {
487487 withClient (createMcpTransport (), mcpAsyncClient -> {
488488 StepVerifier .create (mcpAsyncClient .addRoot (null ))
489- .consumeErrorWith (e -> assertThat (e ).isInstanceOf (McpError .class ).hasMessage ("Root must not be null" ))
489+ .consumeErrorWith (e -> assertThat (e ).isInstanceOf (IllegalArgumentException .class )
490+ .hasMessage ("Root must not be null" ))
490491 .verify ();
491492 });
492493 }
@@ -505,7 +506,7 @@ void testRemoveRoot() {
505506 void testRemoveNonExistentRoot () {
506507 withClient (createMcpTransport (), mcpAsyncClient -> {
507508 StepVerifier .create (mcpAsyncClient .removeRoot ("nonexistent-uri" ))
508- .consumeErrorWith (e -> assertThat (e ).isInstanceOf (McpError .class )
509+ .consumeErrorWith (e -> assertThat (e ).isInstanceOf (IllegalStateException .class )
509510 .hasMessage ("Root with uri 'nonexistent-uri' not found" ))
510511 .verify ();
511512 });
You can’t perform that action at this time.
0 commit comments