@Test public void getInitialVersion() throws Exception { InitialConfigStorage storage = new InitialConfigStorage(underlying); assertThat(() -> storage.getConfig(0L), is(throwing(instanceOf(NoSuchElementException.class)))); }
@Override public Config getConfig(long version) throws ConfigStorageException { if (version == INITIAL_VERSION) { throw new NoSuchElementException("No config for version: " + INITIAL_VERSION); } return underlying.getConfig(version); }
InitialConfigStorage implements ConfigStorage { @Override public Config getConfig(long version) throws ConfigStorageException { if (version == INITIAL_VERSION) { throw new NoSuchElementException("No config for version: " + INITIAL_VERSION); } return underlying.getConfig(version); } }
InitialConfigStorage implements ConfigStorage { @Override public Config getConfig(long version) throws ConfigStorageException { if (version == INITIAL_VERSION) { throw new NoSuchElementException("No config for version: " + INITIAL_VERSION); } return underlying.getConfig(version); } InitialConfigStorage(ConfigStorage underlying); }
InitialConfigStorage implements ConfigStorage { @Override public Config getConfig(long version) throws ConfigStorageException { if (version == INITIAL_VERSION) { throw new NoSuchElementException("No config for version: " + INITIAL_VERSION); } return underlying.getConfig(version); } InitialConfigStorage(ConfigStorage underlying); @Override Config getConfig(long version); @Override void saveConfig(long version, NodeContext config); @Override void reset(); }
InitialConfigStorage implements ConfigStorage { @Override public Config getConfig(long version) throws ConfigStorageException { if (version == INITIAL_VERSION) { throw new NoSuchElementException("No config for version: " + INITIAL_VERSION); } return underlying.getConfig(version); } InitialConfigStorage(ConfigStorage underlying); @Override Config getConfig(long version); @Override void saveConfig(long version, NodeContext config); @Override void reset();  }