updated role tests to use factory implementation and made them data-driven