/*
 * Java Genetic Algorithm Library (@__identifier__@).
 * Copyright (c) @__year__@ Franz Wilhelmstötter
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Author:
 *    Franz Wilhelmstötter (franz.wilhelmstoetter@gmx.at)
 */
package org.jenetics.random;

import org.testng.annotations.DataProvider;

/**
 * @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a>
 */
public class XOR32ShiftRandomTest extends RandomTestBase {

	@Override @DataProvider(name = "seededPRNGPair")
	protected Object[][] getSeededPRNGPair() {
		final long seed = math.seed();
		return new Object[][]{
			{new XOR32ShiftRandom(seed), new XOR32ShiftRandom(seed)},
			{new XOR32ShiftRandom.ThreadSafe(seed), new XOR32ShiftRandom.ThreadSafe(seed)}
		};
	}

	@Override @DataProvider(name = "PRNG")
	protected Object[][] getPRNG() {
		final long seed = math.seed();
		return new Object[][]{
			{new XOR32ShiftRandom(seed)},
			{new XOR32ShiftRandom.ThreadSafe(seed)},
			{new XOR32ShiftRandom.ThreadLocal().get()}
		};
	}

}

@@ -807,16 +807,52 @@
 rovider;
+%0Aimport org.testng.annotations.Test;
 %0A%0A/**%0A *
@@ -979,24 +979,26 @@
 tends Random
+32
 TestBase %7B%0A%0A
@@ -995,33 +995,267 @@
 stBase %7B%0A%0A%09@
-Override 
+Test%0A%09public void create() %7B%0A%09%09new XOR32ShiftRandom();%0A%09%7D%0A%0A%09@Test%0A%09public void createThreadSafe() %7B%0A%09%09new XOR32ShiftRandom.ThreadSafe();%0A%09%7D%0A%0A%09@Test%0A%09public void createThreadLocal() %7B%0A%09%09new XOR32ShiftRandom.ThreadLocal().get();%0A%09%7D%0A%0A%09@Override%0A%09
 @DataProvide
@@ -1329,36 +1329,38 @@
 ) %7B%0A%09%09final 
-long
+byte%5B%5D
  seed = 
 math.seed();
@@ -1343,37 +1343,55 @@
 te%5B%5D seed = 
-math.seed
+XOR32ShiftRandom.seedBytes
 ();%0A
+%0A
 %09%09return new
@@ -1393,32 +1393,33 @@
 n new Object%5B%5D%5B%5D
+ 
 %7B%0A%09%09%09%7Bnew XOR32S
@@ -1457,32 +1457,104 @@
 tRandom(seed)%7D,%0A
+%09%09%09%7Bnew XOR32ShiftRandom.ThreadSafe(seed), new XOR32ShiftRandom(seed)%7D,%0A
 %09%09%09%7Bnew XOR32Shi
@@ -1638,17 +1638,18 @@
 Override
- 
+%0A%09
 @DataPro
@@ -1715,20 +1715,22 @@
 nal 
-long
+byte%5B%5D
  seed = 
 math
@@ -1729,21 +1729,39 @@
 d = 
-math.seed
+XOR32ShiftRandom.seedBytes
 ();%0A
+%0A
 %09%09re
@@ -1779,16 +1779,17 @@
 ject%5B%5D%5B%5D
+ 
 %7B%0A%09%09%09%7Bne
@@ -1913,11 +1913,10 @@
 %09%09%7D;%0A%09%7D%0A
-%0A
 %7D%0A

Fix test class.