### Question:
OMDirectoryCreateRequest extends OMKeyRequest { @Override public OMRequest preExecute(OzoneManager ozoneManager) { CreateDirectoryRequest createDirectoryRequest = getOmRequest().getCreateDirectoryRequest(); Preconditions.checkNotNull(createDirectoryRequest); KeyArgs.Builder newKeyArgs = createDirectoryRequest.getKeyArgs() .toBuilder().setModificationTime(Time.now()); CreateDirectoryRequest.Builder newCreateDirectoryRequest = createDirectoryRequest.toBuilder().setKeyArgs(newKeyArgs); return getOmRequest().toBuilder().setCreateDirectoryRequest( newCreateDirectoryRequest).setUserInfo(getUserInfo()).build(); } OMDirectoryCreateRequest(OMRequest omRequest); @Override OMRequest preExecute(OzoneManager ozoneManager); @Override OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
      long trxnLogIndex, OzoneManagerDoubleBufferHelper omDoubleBufferHelper); static List<OmKeyInfo> getAllParentInfo(OzoneManager ozoneManager,
      KeyArgs keyArgs, List<String> missingParents, List<OzoneAcl> inheritAcls,
      long trxnLogIndex); static OmKeyInfo createDirectoryKeyInfoWithACL(
      String keyName, KeyArgs keyArgs, long objectId,
      List<OzoneAcl> inheritAcls, long transactionIndex);  }### Answer:
@Test public void testPreExecute() throws Exception { String volumeName = "vol1"; String bucketName = "bucket1"; String keyName = "a/b/c"; TestOMRequestUtils.addVolumeAndBucketToDB(volumeName, bucketName, omMetadataManager); OMRequest omRequest = createDirectoryRequest(volumeName, bucketName, keyName); OMDirectoryCreateRequest omDirectoryCreateRequest = new OMDirectoryCreateRequest(omRequest); OMRequest modifiedOmRequest = omDirectoryCreateRequest.preExecute(ozoneManager); Assert.assertNotEquals(omRequest, modifiedOmRequest); }