### Question:
TransactionLogFiles extends LifecycleAdapter implements LogFiles { @Override public File getLogFileForVersion( long version ) { return fileHelper.getLogFileForVersion( version ); } TransactionLogFiles( File logsDirectory, String name, TransactionLogFilesContext context ); @Override void init(); @Override void start(); @Override void shutdown(); @Override long getLogVersion( File historyLogFile ); @Override long getLogVersion( String historyLogFilename ); @Override File[] logFiles(); @Override boolean isLogFile( File file ); @Override File logFilesDirectory(); @Override File getLogFileForVersion( long version ); @Override File getHighestLogFile(); @Override boolean versionExists( long version ); @Override LogHeader extractHeader( long version ); @Override boolean hasAnyEntries( long version ); @Override long getHighestLogVersion(); @Override long getLowestLogVersion(); @Override void accept( LogVersionVisitor visitor ); @Override PhysicalLogVersionedStoreChannel openForVersion( long version ); @Override void accept( LogHeaderVisitor visitor ); @Override LogFile getLogFile(); @Override TransactionLogFileInformation getLogFileInformation(); static final String DEFAULT_NAME; static final FilenameFilter DEFAULT_FILENAME_FILTER; }### Answer:
@Test public void shouldGetTheFileNameForAGivenVersion() throws IOException { final LogFiles files = createLogFiles(); final int version = 12; final File versionFileName = files.getLogFileForVersion( version ); DatabaseLayout databaseLayout = testDirectory.databaseLayout(); final File expected = databaseLayout.file( getVersionedLogFileName( version ) ); assertEquals( expected, versionFileName ); }