Issue #3151975 by daffie, narendra.rajwar27: Replace the database query with an entity query in NodeRevisionsTest