Asserts number of revisions for the given node ID and language code.
protected function assertNodeTranslationsRevisionsCount($id, $langcode, $expected) {
$translation_revisions_count = \Drupal::entityQuery('node')
->accessCheck(FALSE)
->condition('nid', $id)
->condition('langcode', $langcode)
->allRevisions()
->count()
->execute();
$this
->assertEquals($expected, $translation_revisions_count);
}