you can replace both lines (check for failed shards and total hits) with: `assertHitCount(response, 2l)`;