### Question:
S3InitiateMultipartUploadResponse extends OMClientResponse { @Override public void addToDBBatch(OMMetadataManager omMetadataManager, BatchOperation batchOperation) throws IOException { String multipartKey = omMetadataManager.getMultipartKey(omKeyInfo.getVolumeName(), omKeyInfo.getBucketName(), omKeyInfo.getKeyName(), omMultipartKeyInfo.getUploadID()); omMetadataManager.getOpenKeyTable().putWithBatch(batchOperation, multipartKey, omKeyInfo); omMetadataManager.getMultipartInfoTable().putWithBatch(batchOperation, multipartKey, omMultipartKeyInfo); } S3InitiateMultipartUploadResponse(
      @Nonnull OMResponse omResponse,
      @Nonnull OmMultipartKeyInfo omMultipartKeyInfo,
      @Nonnull OmKeyInfo omKeyInfo);  S3InitiateMultipartUploadResponse(@Nonnull OMResponse omResponse); @Override void addToDBBatch(OMMetadataManager omMetadataManager,
      BatchOperation batchOperation); @VisibleForTesting OmMultipartKeyInfo getOmMultipartKeyInfo(); @VisibleForTesting OmKeyInfo getOmKeyInfo();  }### Answer:
@Test public void addDBToBatch() throws Exception { String volumeName = UUID.randomUUID().toString(); String bucketName = UUID.randomUUID().toString(); String keyName = UUID.randomUUID().toString(); String multipartUploadID = UUID.randomUUID().toString(); S3InitiateMultipartUploadResponse s3InitiateMultipartUploadResponse = createS3InitiateMPUResponse(volumeName, bucketName, keyName, multipartUploadID); s3InitiateMultipartUploadResponse.addToDBBatch(omMetadataManager, batchOperation); omMetadataManager.getStore().commitBatchOperation(batchOperation); String multipartKey = omMetadataManager.getMultipartKey(volumeName, bucketName, keyName, multipartUploadID); Assert.assertNotNull(omMetadataManager.getOpenKeyTable().get(multipartKey)); Assert.assertNotNull(omMetadataManager.getMultipartInfoTable() .get(multipartKey)); Assert.assertEquals(multipartUploadID, omMetadataManager.getMultipartInfoTable().get(multipartKey) .getUploadID()); }