private ByteBuffer createMetadataByteBuffer(String... datachunkIds) throws IOException {
      List<StoreKey> storeKeys = new ArrayList<>();
      for (String datachunkId : datachunkIds) {
        storeKeys.add(blobIdFactory.getStoreKey(datachunkId));
      }
      ByteBuffer output;
      switch (metadataContentVersion) {
        case MessageFormatRecord.Metadata_Content_Version_V2:
          output = MetadataContentSerDe.serializeMetadataContentV2(COMPOSITE_BLOB_DATA_CHUNK_SIZE, COMPOSITE_BLOB_SIZE,
              storeKeys);
          break;
        case MessageFormatRecord.Metadata_Content_Version_V3:
          int totalLeft = COMPOSITE_BLOB_SIZE;
          List<Pair<StoreKey, Long>> keyAndSizeList = new ArrayList<>();
          int i = 0;
          while (totalLeft >= COMPOSITE_BLOB_DATA_CHUNK_SIZE) {
            keyAndSizeList.add(new Pair<>(storeKeys.get(i++), (long) COMPOSITE_BLOB_DATA_CHUNK_SIZE));
            totalLeft -= COMPOSITE_BLOB_DATA_CHUNK_SIZE;
          }
          if (totalLeft > 0) {
            keyAndSizeList.add(new Pair<>(storeKeys.get(i), (long) totalLeft));
          }
          output = MetadataContentSerDe.serializeMetadataContentV3(COMPOSITE_BLOB_SIZE, keyAndSizeList);
          break;
        default:
          throw new IllegalStateException("Unexpected metadata content version: " + metadataContentVersion);
      }
      output.flip();
      return output;
    }
Creates metadata blob data buffer from supplied datachunkIds
@param datachunkIds
@return
@throws IOException
ambry-replication/src/test/java/com/github/ambry/replication/BlobIdTransformerTest.java