@Override
    public Checkpoint write(String fileName, int pageNum, int firstUnackedPageNum, long firstUnackedSeqNum, long minSeqNum, int elementCount) throws IOException {
        Checkpoint checkpoint = new Checkpoint(pageNum, firstUnackedPageNum, firstUnackedSeqNum, minSeqNum, elementCount);
        write(fileName, checkpoint);
        return checkpoint;
    }
@Test
    public void write() throws Exception {
        io.write("checkpoint.head", 6, 2, 10L, 8L, 200);
        io.write("checkpoint.head", 6, 2, 10L, 8L, 200);
        Path fullFileName = checkpointFolder.resolve("checkpoint.head");
        byte[] contents = Files.readAllBytes(fullFileName);
        URL url = this.getClass().getResource("checkpoint.head");
        Path path = Paths.get(url.toURI());
        byte[] compare = Files.readAllBytes(path);
        assertThat(contents, is(equalTo(compare)));
    }