building infrastructure for permissions unit tests