Use AuthenticatedUserRule to avoid manually setting and resetting authenticated user singleton

Description

AuthenticatedUserRule sets the singleton AuthenticatedClientUser for the duration of a test, making sure to reset the AuthenticatedUser afterwards. This approach is preferred over manually calling AuthenticatedClientUser.set() in
test setup and AuthenticatedClientUser.remove{} in an @After method.

With the rule we manage AuthenticatedClientUser in a single place and don't need to worry about forgetting to reset it.
Currently, there are still a few places in our tests where we call AuthenticatedClientUser.set() directly when we could use AuthenticatedClientUserRule instead. The goal of this ticket is to change these tests to use AuthenticatedClientUserRule

Environment

None
Fixed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

miasantreble

Reporter

Bin Fan

Labels