public void test_encode_decode_randomBits_stress(){
  final Random r=new Random();
  for (int i=0; i < 10000000; i++) {
    final int nbits=r.nextInt(32);
    final int pid=r.nextInt();
    final int ctr=r.nextInt();
    if (pid == 0 && ctr == 0) {
      continue;
    }
    final TermIdEncoder encoder=new TermIdEncoder(nbits);
    doEncodeDecodeTest(encoder,pid,ctr);
  }
}

public void test_encode_decode_randomBits_stress ( ) { final Random r = new Random ( ) ; for ( int i = 0 ; i < 10000000 ; i ++ ) { final int nbits = r . nextInt ( 32 ) ; final int pid = r . nextInt ( ) ; final int ctr = r . nextInt ( ) ; if ( pid == 0 && ctr == 0 ) { continue ; } final TermIdEncoder encoder = new TermIdEncoder ( nbits ) ; doEncodeDecodeTest ( encoder , pid , ctr ) ; } }
stress test using an encoder with a random number of bits reversed and rotated into the high bits of the long value and random values for the partition identifier and the local counter .
