@Test
public void test_value_reloaded_when_source_modified() throws Exception {

    String bundleName = "folder.bundle";
    String objectName = "folder/bundle.properties";
    ResourceKey key = key(bundleName, "value");
    Clock clock = Clock.systemUTC();
    ResourceResolutionContext ctx = in("ctx");
    ResourceObject bundle1 = given(
            aPropertiesBundle(objectName, "folder/bundle-ctx.properties").with("value","1"));
    HeapResourceObjectRepository source = new HeapResourceObjectRepository(clock);
    source.put(objectName, ctx, bundle1::asStream);
    RefreshableResources resources = new RefreshableResources(configure().sources(source).get());
    OptionalString value = resources.get(key, ctx);
    assertEquals("1", value.asIs());
    ResourceObject bundle2 = given(
            aPropertiesBundle(objectName, "folder/bundle-ctx.properties").with("value","2"));
    source.put(objectName, ctx, bundle2::asStream);
    value = resources.get(key, ctx);
    assertEquals("2", value.asIs());
}