test cases for canAccess