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() {
486
486
void testAddRootWithNullValue () {
487
487
withClient (createMcpTransport (), mcpAsyncClient -> {
488
488
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" ))
490
491
.verify ();
491
492
});
492
493
}
@@ -505,7 +506,7 @@ void testRemoveRoot() {
505
506
void testRemoveNonExistentRoot () {
506
507
withClient (createMcpTransport (), mcpAsyncClient -> {
507
508
StepVerifier .create (mcpAsyncClient .removeRoot ("nonexistent-uri" ))
508
- .consumeErrorWith (e -> assertThat (e ).isInstanceOf (McpError .class )
509
+ .consumeErrorWith (e -> assertThat (e ).isInstanceOf (IllegalStateException .class )
509
510
.hasMessage ("Root with uri 'nonexistent-uri' not found" ))
510
511
.verify ();
511
512
});
You can’t perform that action at this time.
0 commit comments