@Test
  public void testBucketIdTakesExtra8BitsFromStmtId() {
    AcidOutputFormat.Options options = new AcidOutputFormat
            .Options(null)
            .bucket(5000)             // 1|001110001000
            .statementId(12)          //   000000001100
            .maxStmtId(100); //        1100100
    int encode = BucketCodec.getCodec(1).encode(options);
    assertEquals("10001100", Integer.toString(BucketCodec.V1.decodeStatementId(encode), 2));
    assertEquals("1110001000", Integer.toString(BucketCodec.V1.decodeWriterId(encode), 2));
  }
Test Bucket Codec version 1. Represents format of "bucket" property in Hive
3.0.
ql/src/test/org/apache/hadoop/hive/ql/io/TestBucketCodec.java