void () { final int pageSize = pagedStorage.getPageSize(); final int enoughRecords = (pageSize / RECORD_SIZE_IN_BYTES) * 16; long expectedRecordOffsetInFile = PersistentFSRecordsOverLockFreePagedStorage.HEADER_SIZE; for (int recordId = NULL_ID + 1; recordId < enoughRecords; recordId++) { final long recordOffsetInFile = storage.recordOffsetInFileUnchecked(recordId); assertEquals("recordOffset(recordId:" + recordId + ") must be " + expectedRecordOffsetInFile, expectedRecordOffsetInFile, recordOffsetInFile ); expectedRecordOffsetInFile += RECORD_SIZE_IN_BYTES; if (pageSize - (expectedRecordOffsetInFile % pageSize) < RECORD_SIZE_IN_BYTES) { expectedRecordOffsetInFile = (expectedRecordOffsetInFile / pageSize + 1) * pageSize; } } }