public void test_encode_decode_0bits_stress(){
  final Random r=new Random();
  final TermIdEncoder encoder=new TermIdEncoder(0);
  for (int i=0; i < 1000000; i++) {
    final long v0=r.nextLong();
    if (v0 == 0L) {
      continue;
    }
    final long v1=encoder.encode(v0);
    final long v2=encoder.encode2(v0);
    assertTrue(v1 == v2);
    if (v0 != v1)     fail(encoder,v0,v1);
  }
}

public void test_encode_decode_0bits_stress ( ) { final Random r = new Random ( ) ; final TermIdEncoder encoder = new TermIdEncoder ( 0 ) ; for ( int i = 0 ; i < 1000000 ; i ++ ) { final long v0 = r . nextLong ( ) ; if ( v0 == 0L ) { continue ; } final long v1 = encoder . encode ( v0 ) ; final long v2 = encoder . encode2 ( v0 ) ; assertTrue ( v1 == v2 ) ; if ( v0 != v1 ) fail ( encoder , v0 , v1 ) ; } }
stress test using an encoder with no bits reversed and rotated into the high bits of the long value and random values for the partition identifier and the local counter .
