@Test(expected = BadCheckpointException.class) public void testCheckpointVersionNotEqualToMeta2() throws Exception { FileOutputStream os = null; try { EventQueueBackingStore backingStore = EventQueueBackingStoreFactory. get(checkpoint, 10, "test"); backingStore.close(); Assert.assertTrue(checkpoint.exists()); Assert.assertTrue(Serialization.getMetaDataFile(checkpoint).length() != 0); FileInputStream is = new FileInputStream(Serialization.getMetaDataFile(checkpoint)); ProtosFactory.Checkpoint meta = ProtosFactory.Checkpoint.parseDelimitedFrom(is); Assert.assertNotNull(meta); is.close(); os = new FileOutputStream( Serialization.getMetaDataFile(checkpoint)); meta.toBuilder().setVersion(2).build().writeDelimitedTo(os); os.flush(); backingStore = EventQueueBackingStoreFactory.get(checkpoint, 10, "test"); } finally { os.close(); } }
static EventQueueBackingStore get(File checkpointFile, int capacity, String name) throws Exception { return get(checkpointFile, capacity, name, true); }
EventQueueBackingStoreFactory { static EventQueueBackingStore get(File checkpointFile, int capacity, String name) throws Exception { return get(checkpointFile, capacity, name, true); } }
EventQueueBackingStoreFactory { static EventQueueBackingStore get(File checkpointFile, int capacity, String name) throws Exception { return get(checkpointFile, capacity, name, true); } private  EventQueueBackingStoreFactory(); }
EventQueueBackingStoreFactory { static EventQueueBackingStore get(File checkpointFile, int capacity, String name) throws Exception { return get(checkpointFile, capacity, name, true); } private  EventQueueBackingStoreFactory();  }
EventQueueBackingStoreFactory { static EventQueueBackingStore get(File checkpointFile, int capacity, String name) throws Exception { return get(checkpointFile, capacity, name, true); } private  EventQueueBackingStoreFactory();   }