### Question:
StoreFiles { public StoreId readStoreId( DatabaseLayout databaseLayout ) throws IOException { File neoStoreFile = databaseLayout.metadataStore(); org.neo4j.storageengine.api.StoreId kernelStoreId = MetaDataStore.getStoreId( pageCache, neoStoreFile ); return new StoreId( kernelStoreId.getCreationTime(), kernelStoreId.getRandomId(), kernelStoreId.getUpgradeTime(), kernelStoreId.getUpgradeId() ); } StoreFiles( FileSystemAbstraction fs, PageCache pageCache );  StoreFiles( FileSystemAbstraction fs, PageCache pageCache, FilenameFilter fileFilter ); void delete( File storeDir, LogFiles logFiles ); void moveTo( File source, File target, LogFiles logFiles ); boolean isEmpty( File storeDir, Collection<File> filesToLookFor ); StoreId readStoreId( DatabaseLayout databaseLayout );  }### Answer:
@Test public void mustReadStoreId() throws Exception { File dir = getBaseDir(); DatabaseLayout databaseLayout = testDirectory.databaseLayout( dir ); File neostore = databaseLayout.metadataStore(); ThreadLocalRandom rng = ThreadLocalRandom.current(); long time = rng.nextLong(); long randomNumber = rng.nextLong(); long upgradeTime = rng.nextLong(); long upgradeTransactionId = rng.nextLong(); createOnFileSystem( neostore ); MetaDataStore.setRecord( pageCache, neostore, Position.TIME, time ); MetaDataStore.setRecord( pageCache, neostore, Position.RANDOM_NUMBER, randomNumber ); MetaDataStore.setRecord( pageCache, neostore, Position.STORE_VERSION, rng.nextLong() ); MetaDataStore.setRecord( pageCache, neostore, Position.UPGRADE_TIME, upgradeTime ); MetaDataStore.setRecord( pageCache, neostore, Position.UPGRADE_TRANSACTION_ID, upgradeTransactionId ); StoreId storeId = storeFiles.readStoreId( databaseLayout ); assertThat( storeId.getCreationTime(), is( time ) ); assertThat( storeId.getRandomId(), is( randomNumber ) ); assertThat( storeId.getUpgradeTime(), is( upgradeTime ) ); assertThat( storeId.getUpgradeId(), is( upgradeTransactionId ) ); }