@Test public void testLoadConfiguration() throws Exception { makeConfigurationExisting("test".getBytes()); assertArrayEquals("test".getBytes(), IOUtils.toByteArray(storage.load())); }
@Override public InputStream load() { try { if (configFile.exists()) { return new FileInputStream(configFile); } return null; } catch (final FileNotFoundException e) { throw new RuntimeException(e); } }
FileStorage implements Storage { @Override public InputStream load() { try { if (configFile.exists()) { return new FileInputStream(configFile); } return null; } catch (final FileNotFoundException e) { throw new RuntimeException(e); } } }
FileStorage implements Storage { @Override public InputStream load() { try { if (configFile.exists()) { return new FileInputStream(configFile); } return null; } catch (final FileNotFoundException e) { throw new RuntimeException(e); } } FileStorage();   FileStorage(final File localStorageDirectory); }
FileStorage implements Storage { @Override public InputStream load() { try { if (configFile.exists()) { return new FileInputStream(configFile); } return null; } catch (final FileNotFoundException e) { throw new RuntimeException(e); } } FileStorage();   FileStorage(final File localStorageDirectory); @Override void save(final InputStream stream); @Override InputStream load(); }
FileStorage implements Storage { @Override public InputStream load() { try { if (configFile.exists()) { return new FileInputStream(configFile); } return null; } catch (final FileNotFoundException e) { throw new RuntimeException(e); } } FileStorage();   FileStorage(final File localStorageDirectory); @Override void save(final InputStream stream); @Override InputStream load();  }