//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldReadAndCacheFirstCommittedTransactionIdForAGivenVersionWhenNotCached() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldReadAndCacheFirstCommittedTransactionIdForAGivenVersionWhenNotCached()
        {
            TransactionLogFileInformation info = new TransactionLogFileInformation(_logFiles, _logHeaderCache, _context);
            long expected = 5;

            long version = 10L;

            when(_logHeaderCache.getLogHeader(version)).thenReturn(null);
            when(_logFiles.versionExists(version)).thenReturn(true);
            when(_logFiles.extractHeader(version)).thenReturn(new LogHeader((sbyte)-1, -1L, expected - 1L)
                                                              );

            long firstCommittedTxId = info.GetFirstEntryId(version);

            assertEquals(expected, firstCommittedTxId);
            verify(_logHeaderCache, times(1)).putHeader(version, expected - 1);
        }