@Test(expected =RuntimeException.class) public void shouldEndFailureBePropagated() throws IOException { final Storage storage = Mockito.mock(Storage.class); Mockito.doThrow(new IOException()).when(storage).end(); final ConsolidationListener.Persistent consolidationListener = Storages.asConsolidationListener(storage, Loggers.BASE_LOGGER); consolidationListener.getLatestTimestamp(); }
public static ConsolidationListener.Persistent asConsolidationListener(final Storage storage, final Logger logger) { Preconditions.checkNotNull(storage, "null storage"); return new StorageWrapper(storage, logger); }
Storages { public static ConsolidationListener.Persistent asConsolidationListener(final Storage storage, final Logger logger) { Preconditions.checkNotNull(storage, "null storage"); return new StorageWrapper(storage, logger); } }
Storages { public static ConsolidationListener.Persistent asConsolidationListener(final Storage storage, final Logger logger) { Preconditions.checkNotNull(storage, "null storage"); return new StorageWrapper(storage, logger); } private  Storages(); }
Storages { public static ConsolidationListener.Persistent asConsolidationListener(final Storage storage, final Logger logger) { Preconditions.checkNotNull(storage, "null storage"); return new StorageWrapper(storage, logger); } private  Storages(); static ConsolidationListener.Persistent asConsolidationListener(final Storage storage, final Logger logger); }
Storages { public static ConsolidationListener.Persistent asConsolidationListener(final Storage storage, final Logger logger) { Preconditions.checkNotNull(storage, "null storage"); return new StorageWrapper(storage, logger); } private  Storages(); static ConsolidationListener.Persistent asConsolidationListener(final Storage storage, final Logger logger);  }