@Test
public void dumpRawPageHistoryToDefaultDir() throws Exception {

    diagnosticProcessor.dumpPageHistory(new PageHistoryDiagnoster.DiagnosticPageBuilder()
        .pageIds(expectedPageId)
        .addAction(PRINT_TO_RAW_FILE)
    );
    Path path = Paths.get(U.defaultWorkDirectory(), DEFAULT_TARGET_FOLDER);
    File dumpFile = path.toFile().listFiles((dir, name) -> name.endsWith(RAW_FILE_FORMAT))[0];
    try (SegmentIO io = new SegmentIO(0L, new RandomAccessFileIO(dumpFile, StandardOpenOption.READ))) {
        SegmentHeader hdr = RecordV1Serializer.readSegmentHeader(io, new SimpleSegmentFileInputFactory());
        assertFalse(hdr.isCompacted());
        assertEquals(RecordSerializerFactory.LATEST_SERIALIZER_VERSION, hdr.getSerializerVersion());
    }
}