Testing improvements to allow easy permission checking