@Test
public void should_update_bundle() throws Exception {

    final File file = folder.newFile();
    Files.copy(new File("src/test/resources/restx/i18n/test.properties"), file);
    DefaultMutableMessages m = new DefaultMutableMessages("restx.i18n.mtest") {
        @Override
        protected URL getResource(String resourceName) {
            try {
                return file.toURI().toURL();
            } catch (MalformedURLException e) {
                throw new RuntimeException(e);
            }
        }
    };
    assertThat(m.getMessage("key1", Locale.ENGLISH)).isEqualTo("Hello!");
    m.setMessageTemplate("key1", "Greetings!", Locale.ENGLISH);
    assertThat(m.getMessage("key1", Locale.ENGLISH)).isEqualTo("Greetings!");
    assertThat(file).hasContent("key1=Greetings!\nkey2=Hello {{who}}!");
}