Added support for roles and associated tests