PropertyFileConfigurationSource extends AbstractConfigurationSource { @Override public void save(String key, String value) throws IOException { if (file != null) { synchronized (this) { properties.put(key, value); final FileOutputStream out = new FileOutputStream(file); properties.store(out, null); out.flush(); out.close(); } } else { throw new IOException(location + " is not writeable"); } } PropertyFileConfigurationSource(String location); @Override void reload(); @Override boolean isSavingPersistent(); @Override String getName(); static boolean isPresent(String location); static Properties getFromClasspath(String classpathLocation, ClassLoader classLoader); @Override String getValue(String key); @Override boolean isSavingPossible(); @Override void save(String key, String value);  }
@Test(expected = IOException.class) public void testSaveToJar() throws Exception { PropertyFileConfigurationSource source = new PropertyFileConfigurationSource("META-INF/maven/org.slf4j/slf4j-api/pom.properties"); source.save("foo", "bar"); }