package jdk.java.util;

import java.util.Random;

import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 
 * 
 * @since 2018-01-23
 * @author fixalot
 */
public class RandomTest {
	@SuppressWarnings("unused")
	private static final Logger logger = LoggerFactory.getLogger(RandomTest.class);

	@Test
	public void test() {
		for (int i = 0; i < 1000; ++i) {
			Random random = new Random();
			int num = random.nextInt(); // int의 최솟값 ~ 최댓값 사이에서 랜덤값 추출
			Assert.assertTrue(Integer.MIN_VALUE <= num && num <= Integer.MAX_VALUE);
			num = random.nextInt(1000); // 0부터 1000 사이에서 랜덤값 추출
			Assert.assertTrue(0 <= num && num <= 1000);
		}
	}
}

@@ -41,16 +41,51 @@
 .Random;
+%0Aimport java.util.stream.IntStream;
 %0A%0Aimport
@@ -266,16 +266,18 @@
 mTest %7B%0A
+//
 %09@Suppre
@@ -297,16 +297,16 @@
 nused%22)%0A
-
 %09private
@@ -403,16 +403,23 @@
 oid test
+NextInt
 () %7B%0A%09%09f
@@ -726,13 +726,224 @@
 0);%0A
-
 %09%09%7D%0A%09%7D%0A
+%09%0A%09@Test%0A%09public void testInts() %7B%0A%09%09Random random = new Random();%0A%09%09IntStream a = random.ints();%0A%09%09logger.debug(String.valueOf(a.count()));%0A%09%09a = random.ints(100);%0A%09%09logger.debug(String.valueOf(a.count()));%0A%09%7D%0A
 %7D%0A

add test case