public int termLength()
    {
        return termLength;
    }
@Test
    void throwsIllegalStateExceptionIfLogFileSizeIsLessThanLogMetaDataLength(@TempDir final Path dir)
        throws IOException
    {
        final Path logFile = dir.resolve("test.log");
        assertNotNull(Files.createFile(logFile));
        final int fileLength = LOG_META_DATA_LENGTH - 5;
        final byte[] contents = new byte[fileLength];
        final UnsafeBuffer buffer = new UnsafeBuffer(contents);
        termLength(buffer, TERM_MIN_LENGTH);
        pageSize(buffer, PAGE_MIN_SIZE);
        assertNotNull(Files.write(logFile, contents));
        assertEquals(contents.length, Files.size(logFile));

        final IllegalStateException exception = assertThrowsExactly(
            IllegalStateException.class, () -> new LogBuffers(logFile.toAbsolutePath().toString()));
        assertEquals("Log file length less than min length of " + LOG_META_DATA_LENGTH + ": length=" + fileLength,
            exception.getMessage());
    }