### Question:
FileOperationManager implements IFileOperationManager { @Nonnull public FileIOError deleteFile (@Nonnull final File aFile) { m_aLastError = FileOperations.deleteFile (aFile); _handleLastError (m_aLastError); return m_aLastError; } FileOperationManager(); @Nonnull @ReturnsMutableObject CallbackList <IFileOperationCallback> callbacks(); @Nullable FileIOError getLastError(); @Nullable EFileIOOperation getLastOperation(); @Nonnull FileIOError createDir(@Nonnull final File aDir); @Nonnull FileIOError createDirIfNotExisting(@Nonnull final File aDir); @Nonnull FileIOError createDirRecursive(@Nonnull final File aDir); @Nonnull FileIOError createDirRecursiveIfNotExisting(@Nonnull final File aDir); @Nonnull FileIOError deleteDir(@Nonnull final File aDir); @Nonnull FileIOError deleteDirIfExisting(@Nonnull final File aDir); @Nonnull FileIOError deleteDirRecursive(@Nonnull final File aDir); @Nonnull FileIOError deleteDirRecursiveIfExisting(@Nonnull final File aDir); @Nonnull FileIOError deleteFile(@Nonnull final File aFile); @Nonnull FileIOError deleteFileIfExisting(@Nonnull final File aFile); @Nonnull FileIOError renameDir(@Nonnull final File aSourceDir, @Nonnull final File aTargetDir); @Nonnull FileIOError renameFile(@Nonnull final File aSourceFile, @Nonnull final File aTargetFile); @Nonnull FileIOError copyDirRecursive(@Nonnull final File aSourceDir, @Nonnull final File aTargetDir); @Nonnull FileIOError copyFile(@Nonnull final File aSourceFile, @Nonnull final File aTargetFile); @Override String toString(); static final IFileOperationManager INSTANCE; }### Answer:
@Test public void testDeleteFile () { final IFileOperationManager aFOM = new FileOperationManager (); final File aFile = new File ("delfile.test"); try { assertFalse (FileHelper.existsFile (aFile)); _expectedError (aFOM.deleteFile (aFile), EFileIOErrorCode.SOURCE_DOES_NOT_EXIST); assertEquals (EFileIOOperation.DELETE_FILE, aFOM.getLastOperation ()); SimpleFileIO.writeFile (aFile, "yzz".getBytes (StandardCharsets.ISO_8859_1)); _expectedSuccess (aFOM.deleteFile (aFile)); assertEquals (EFileIOOperation.DELETE_FILE, aFOM.getLastOperation ()); assertFalse (FileHelper.existsFile (aFile)); } finally { aFOM.deleteFile (aFile); assertEquals (EFileIOOperation.DELETE_FILE, aFOM.getLastOperation ()); } }