//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void failStoreInitializationWhenHeaderRecordCantBeRead() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void FailStoreInitializationWhenHeaderRecordCantBeRead() { File storeFile = _dir.file("a"); File idFile = _dir.file("idFile"); PageCache pageCache = mock(typeof(PageCache)); PagedFile pagedFile = mock(typeof(PagedFile)); PageCursor pageCursor = mock(typeof(PageCursor)); when(pageCache.Map(eq(storeFile), anyInt(), any(typeof(OpenOption)))).thenReturn(pagedFile); when(pagedFile.Io(0L, Org.Neo4j.Io.pagecache.PagedFile_Fields.PF_SHARED_READ_LOCK)).thenReturn(pageCursor); when(pageCursor.Next()).thenReturn(false); RecordFormats recordFormats = Standard.LATEST_RECORD_FORMATS; ExpectedException.expect(typeof(StoreNotFoundException)); ExpectedException.expectMessage("Fail to read header record of store file: " + storeFile.AbsolutePath); using (DynamicArrayStore dynamicArrayStore = new DynamicArrayStore(storeFile, idFile, _config, IdType.NODE_LABELS, _idGeneratorFactory, pageCache, NullLogProvider.Instance, Settings.INTEGER.apply(GraphDatabaseSettings.label_block_size.DefaultValue), recordFormats)) { dynamicArrayStore.Initialise(false); } }