void () { final int pageSize = pagedStorage.getPageSize(); final int enoughRecords = (pageSize / RECORD_SIZE_IN_BYTES) * 16; for (int recordId = 0; recordId < enoughRecords; recordId++) { final long recordOffsetInFile = storage.recordOffsetInFileUnchecked(recordId); final long recordEndOffsetInFile = recordOffsetInFile + RECORD_SIZE_IN_BYTES - 1; assertEquals( "Record(#" + recordId + ", offset: " + recordOffsetInFile + ") must start and end on a same page", recordOffsetInFile / pageSize, recordEndOffsetInFile / pageSize ); } }