Replace the database queries with an entity queries in NodeRevisionPermissionsTest