private async Task <bool> IsDatabaseInExpectedState() { var lastProcessedEventId = await EventTestsRepository.GetLastProcessedEventId <string>(EventName); if (lastProcessedEventId != "3") { return(false); } var numberOfDataLockEvents = await EventTestsRepository.GetNumberOfDataLockEvents(); if (numberOfDataLockEvents != 3) { return(false); } var numberOfDataLockErrors = await EventTestsRepository.GetNumberOfDataLockErrors(); if (numberOfDataLockErrors != 6) { return(false); } return(true); }