Add assert to GenerateRandomNumber() method