@Test
  public void testBucketIdTakesExtra4BitsFromStmtId() {
    AcidOutputFormat.Options options = new AcidOutputFormat
            .Options(null)
            .bucket(65535)
            .statementId(150)         //   000010010110
            .maxStmtId(150); //       10010110
    int encode = BucketCodec.getCodec(1).encode(options);
    assertEquals("111110010110", Integer.toString(BucketCodec.V1.decodeStatementId(encode), 2));
    assertEquals("111111111111", 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