Unit testing authorization