PARSERLIB-28 larger refactoring to add a mocked definition object