@Test (expected = InvalidProtocolBufferException.class) public void testCorruptMeta() throws Throwable { EventQueueBackingStore backingStore = EventQueueBackingStoreFactory. get(checkpoint, 10, "test"); backingStore.close(); Assert.assertTrue(checkpoint.exists()); File metaFile = Serialization.getMetaDataFile(checkpoint); Assert.assertTrue(metaFile.length() != 0); RandomAccessFile writer = new RandomAccessFile(metaFile, "rw"); writer.seek(10); writer.writeLong(new Random().nextLong()); writer.getFD().sync(); writer.close(); try { backingStore = EventQueueBackingStoreFactory.get(checkpoint, 10, "test"); } catch (BadCheckpointException ex) { throw ex.getCause(); } }
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();   }