- assertThrows(RestconfDocumentedException.class, () -> YangInstanceIdentifierDeserializer.create(SCHEMA_CONTEXT,
- "refs/list-with-identityref=deserializer-test:derived-identity/foo"));
+ final var ex = assertThrows(RestconfDocumentedException.class,
+ () -> YangInstanceIdentifierDeserializer.create(SCHEMA_CONTEXT,
+ "deserializer-test-included:refs/list-with-identityref=deserializer-test:derived-identity/foo"));
+ assertEquals("errors: [RestconfError [error-type: protocol, error-tag: bad-element, "
+ + "error-message: Cannot decode value 'deserializer-test' for identityref type in "
+ + "(deserializer:test:included?revision=2016-06-06)list-with-identityref. Make sure reserved characters "
+ + "such as comma, single-quote, double-quote, colon, double-quote, space, and forward slash (,'\":\" /) "
+ + "are percent-encoded, for example ':' is '%3A']]", ex.getMessage());
+ final var errors = ex.getErrors();
+ assertEquals(1, errors.size());
+ assertEquals(ErrorType.PROTOCOL, errors.get(0).getErrorType());
+ assertEquals(ErrorTag.BAD_ELEMENT, errors.get(0).getErrorTag());