private void testWriteIntoOutputStream(IndividualBytesFieldCell ic, KeyValue kv, boolean withTags)
    throws IOException {
    ByteArrayOutputStream outIC = new ByteArrayOutputStream(ic.getSerializedSize(withTags));
    ByteArrayOutputStream outKV = new ByteArrayOutputStream(kv.getSerializedSize(withTags));

    // compare the number of bytes written
    assertEquals(kv.write(outKV, withTags), ic.write(outIC, withTags));
    // compare the underlying byte array
    assertArrayEquals(outKV.getBuffer(), outIC.getBuffer());
  }
@param ic       An instance of IndividualBytesFieldCell to compare.
@param kv       An instance of KeyValue to compare.
@param withTags Whether to write tags.
hbase-common/src/test/java/org/apache/hadoop/hbase/TestIndividualBytesFieldCell.java