private byte[] getBytesForStoreDescriptor(short version, UUID incarnationIdUUID) {
    int size = StoreDescriptor.VERSION_SIZE + StoreDescriptor.INCARNATION_ID_LENGTH_SIZE + incarnationIdUUID.toString()
        .getBytes().length;
    byte[] toBytes = new byte[size];
    ByteBuffer byteBuffer = ByteBuffer.wrap(toBytes);
    byteBuffer.putShort(version);
    Utils.serializeString(byteBuffer, incarnationIdUUID.toString(), Charset.defaultCharset());
    byteBuffer.flip();
    return byteBuffer.array();
  }
Generates the byte array value for a given version and incarnationId
@param version the version to be used while writing
@param incarnationIdUUID the incarnationId of the store
@return the byte array representation of the store descriptor (excluding the crc)
ambry-store/src/test/java/com/github/ambry/store/StoreDescriptorTest.java