public void FillUInt16Array_ShouldProduceDesiredResults_ForUnboundedInvocation() { // Arrange. var arrayLength = 30; var array = new UInt16[arrayLength]; using (var randomNumberGenerator = RandomNumberGenerator.Create()) { // Act. randomNumberGenerator.FillUInt16Array(array); // Assert. array.Length.Should().Be(arrayLength); array.GroupBy(value => value).Any(group => group.Count() > 2).Should().BeFalse(); } }