@Test
public void testSafeCreateCommandExisting() throws Exception {

  String alias = "javax.jdo.option.ConnectionPassword";
  String credential = "MyTopSecretPassword";
  String providerPath = getProviderPath("CreateCommandTest.jceks");
  String[] args;
  int exitCode;
  /*
   * Create a new credential
   */
  args = getCreateArgs(alias, credential, providerPath);
  exitCode = ToolRunner.run(new Configuration(), new CredentialUtil(), args);
  Assert.assertEquals(exitCode, 0);
  /*
   * Safely update the previously created credential. Nothing is done.
   */
  credential = "AnotherTopSecretPassword";
  args = getSafeCreateArgs(alias, credential, providerPath);
  exitCode = executeCommand(args);
  Assert.assertEquals(exitCode, 0);
}