public static BytesRef randomBinaryTerm(Random r){
  int length=r.nextInt(15);
  BytesRef b=new BytesRef(length);
  r.nextBytes(b.bytes);
  b.length=length;
  return b;
}

public static BytesRef randomBinaryTerm ( Random r ) { int length = r . nextInt ( 15 ) ; BytesRef b = new BytesRef ( length ) ; r . nextBytes ( b . bytes ) ; b . length = length ; return b ; }
returns a random binary term .
