### Question:
OMKeyCommitRequest extends OMKeyRequest { @Override public OMRequest preExecute(OzoneManager ozoneManager) throws IOException { CommitKeyRequest commitKeyRequest = getOmRequest().getCommitKeyRequest(); Preconditions.checkNotNull(commitKeyRequest); KeyArgs keyArgs = commitKeyRequest.getKeyArgs(); final boolean checkKeyNameEnabled = ozoneManager.getConfiguration() .getBoolean(OMConfigKeys.OZONE_OM_KEYNAME_CHARACTER_CHECK_ENABLED_KEY, OMConfigKeys.OZONE_OM_KEYNAME_CHARACTER_CHECK_ENABLED_DEFAULT); if(checkKeyNameEnabled){ OmUtils.validateKeyName(StringUtils.removeEnd(keyArgs.getKeyName(), OzoneConsts.FS_FILE_COPYING_TEMP_SUFFIX)); } KeyArgs.Builder newKeyArgs = keyArgs.toBuilder().setModificationTime(Time.now()) .setKeyName(validateAndNormalizeKey( ozoneManager.getEnableFileSystemPaths(), keyArgs.getKeyName())); return getOmRequest().toBuilder() .setCommitKeyRequest(commitKeyRequest.toBuilder() .setKeyArgs(newKeyArgs)).setUserInfo(getUserInfo()).build(); } OMKeyCommitRequest(OMRequest omRequest); @Override OMRequest preExecute(OzoneManager ozoneManager); @Override @SuppressWarnings("methodlength") OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
      long trxnLogIndex, OzoneManagerDoubleBufferHelper omDoubleBufferHelper);  }### Answer:
@Test public void testPreExecute() throws Exception { doPreExecute(createCommitKeyRequest()); }