Testing interface that with different "loggedInUsers"

My interface hides or shows buttons based on the users role, determined by "loggedInUser()".   I would like to test the interface mocking different logged in users.   Is there a way to achieve that?

  Discussion posts and replies are publicly visible