//in order to examine that the node id field is not
//overlapped with the time field.
public void testRotatingIDStructure() throws Exception
{
final int nodeID = 0x0200;
RotatingID id = new RotatingID(nodeID);
final int NUM_ID = 65535;
Set<Long> ids = new HashSet<Long>(NUM_ID);
List<Long> idlst = new ArrayList<Long>(NUM_ID);
long beginTm = System.currentTimeMillis();
try
{
Thread.sleep(1000);
}
catch (InterruptedException e)
{
//ignore
}
for (int i = 0; i < NUM_ID; i++)
{
long mid = id.getID();
if (ids.contains(mid))
{
fail("Already produced id " + mid);
}
ids.add(mid);