### Question:
OMGetDelegationTokenResponse extends OMClientResponse { @Override public void addToDBBatch(OMMetadataManager omMetadataManager, BatchOperation batchOperation) throws IOException { Table table = omMetadataManager.getDelegationTokenTable(); if (ozoneTokenIdentifier != null && getOMResponse().getStatus() == OzoneManagerProtocolProtos.Status.OK) { table.putWithBatch(batchOperation, ozoneTokenIdentifier, renewTime); } } OMGetDelegationTokenResponse(
      @Nullable OzoneTokenIdentifier ozoneTokenIdentifier,
      long renewTime, @Nonnull OMResponse omResponse); @Override void addToDBBatch(OMMetadataManager omMetadataManager,
      BatchOperation batchOperation);  }### Answer:
@Test public void testAddToDBBatch() throws IOException { OMResponse omResponse = OMResponse.newBuilder() .setCmdType(Type.GetDelegationToken) .setStatus(Status.OK) .setSuccess(true) .setGetDelegationTokenResponse( updateGetDelegationTokenRequest .getGetDelegationTokenResponse()) .build(); long renewTime = 1000L; OMGetDelegationTokenResponse getDelegationTokenResponse = new OMGetDelegationTokenResponse(identifier, renewTime, omResponse); getDelegationTokenResponse.addToDBBatch(omMetadataManager, batchOperation); omMetadataManager.getStore().commitBatchOperation(batchOperation); long rowNumInTable = 1; long rowNumInTokenTable = omMetadataManager .countRowsInTable(omMetadataManager.getDelegationTokenTable()); Assert.assertEquals(rowNumInTable, rowNumInTokenTable); long renewTimeInTable = omMetadataManager.getDelegationTokenTable() .get(identifier); Assert.assertEquals(renewTime, renewTimeInTable); }