Extracted privilege controller tests.

Moved them into a separate file.