@Test(expected = BadCheckpointException.class)
public void testCheckpointOrderIdNotEqualToMeta() throws Exception {

  RandomAccessFile writer = new RandomAccessFile(checkpoint, "rw");
  try {
    EventQueueBackingStore backingStore =
        EventQueueBackingStoreFactory.get(checkpoint, 10, "test", new FileChannelCounter("test"));
    backingStore.close();
    writer.seek(EventQueueBackingStoreFile.INDEX_WRITE_ORDER_ID * Serialization.SIZE_OF_LONG);
    writer.writeLong(2L);
    writer.getFD().sync();
    backingStore = EventQueueBackingStoreFactory.get(
        checkpoint, 10, "test", new FileChannelCounter("test")
    );
  } finally {
    writer.close();
  }
}