fix possible duplicate keys

This commit is contained in:
Sebastian Sdorra
2012-09-02 17:14:56 +02:00
parent d7c7814f04
commit a94a2bf774
2 changed files with 36 additions and 1 deletions

View File

@@ -57,6 +57,24 @@ import java.util.concurrent.TimeoutException;
public class DefaultKeyGeneratorTest
{
/**
* Method description
*
*/
@Test
public void testCreateRandom()
{
DefaultKeyGenerator gen = new DefaultKeyGenerator();
for (int i = 0; i < 10000; i++)
{
int r = gen.createRandom();
assertTrue(r >= 100);
assertTrue(r <= 999);
}
}
/**
* Method description
*