### Question:
MuleInstallMojo extends AbstractMuleMojo { public void renameFile(File orig, File dest) throws MojoExecutionException { try { Files.move(orig.toPath(), dest.toPath(), REPLACE_EXISTING); } catch (IOException e) { throw new MojoExecutionException(String.format("Could not rename %1s to %2s", orig.getAbsolutePath(), dest.getAbsolutePath()), e); } }  void execute(); void renameFile(File orig, File dest);  }### Answer:
@Test public void renameFile() throws IOException, MojoExecutionException { String origFileName = "file.temp"; String destFileName = "file.zip"; File orig = temp.newFile(origFileName); File dest = new File(temp.getRoot(), destFileName); assertThat("Origin file should exist", orig.exists()); assertThat("Destination file should not exist", !dest.exists()); mojo.renameFile(orig, dest); assertThat("Origin file should not exist", !orig.exists()); assertThat("Destination file should exist", dest.exists()); }