XWIKI-8934: Delegate to the model the parsing of rights objects
* fix typo
Add test and improve test framework