@Test
public void dumpPageHistoryToCustomRelativeDir() throws Exception {

    Path path = Paths.get(U.defaultWorkDirectory(), DEFAULT_TARGET_FOLDER, TEST_DUMP_PAGE_FILE);
    diagnosticProcessor.dumpPageHistory(new PageHistoryDiagnoster.DiagnosticPageBuilder()
        .pageIds(expectedPageId)
        .folderForDump(new File(TEST_DUMP_PAGE_FILE))
        .addAction(PRINT_TO_FILE)
    );
    File dumpFile = path.toFile().listFiles((dir, name) -> name.endsWith(FILE_FORMAT))[0];
    List<String> records = Files.readAllLines(dumpFile.toPath());
    assertTrue(!records.isEmpty());
    assertTrue(records.stream().anyMatch(line -> line.contains("CheckpointRecord")));
}