@Test
  public void testRoundTrip() {
    CellMessage.Cell cell =
      CellMessage.Cell.newBuilder().setRow(ByteString.copyFromUtf8("row")).build();
    PositionedByteRange pbr = new SimplePositionedByteRange(cell.getSerializedSize());
    pbr.setPosition(0);
    int encodedLength = CODEC.encode(pbr, cell);
    pbr.setPosition(0);
    CellMessage.Cell decoded = CODEC.decode(pbr);
    assertEquals(encodedLength, pbr.getPosition());
    assertEquals("row", decoded.getRow().toStringUtf8());
  }
Basic test to verify utility methods in {@link PBType} and delegation to protobuf works.
hbase-examples/src/test/java/org/apache/hadoop/hbase/types/TestPBCell.java