### Question:
DefaultFileDeletionEventListener implements FileWatchEventListener { @Override public void fileDeleted( String fileName ) { if ( !fileNameFilter.test( fileName ) ) { internalLog.error( format( "'%s' which belongs to the store was deleted while database was running.", fileName ) ); } } DefaultFileDeletionEventListener( LogService logService, Predicate<String> fileNameFilter ); @Override void fileDeleted( String fileName );  }### Answer:
@Test public void notificationInLogAboutFileDeletion() { AssertableLogProvider internalLogProvider = new AssertableLogProvider( false ); DefaultFileDeletionEventListener listener = buildListener( internalLogProvider ); listener.fileDeleted( "testFile.db" ); listener.fileDeleted( "anotherDirectory" ); internalLogProvider.rawMessageMatcher().assertContains( "'testFile.db' which belongs to the store was deleted while database was running." ); internalLogProvider.rawMessageMatcher().assertContains( "'anotherDirectory' which belongs to the store was deleted while database was running." ); }
@Test public void noNotificationForTransactionLogs() { AssertableLogProvider internalLogProvider = new AssertableLogProvider( false ); DefaultFileDeletionEventListener listener = buildListener( internalLogProvider ); listener.fileDeleted( TransactionLogFiles.DEFAULT_NAME + ".0" ); listener.fileDeleted( TransactionLogFiles.DEFAULT_NAME + ".1" ); internalLogProvider.assertNoLoggingOccurred(); }