DerivedStringProperty implements Property<D> { protected void propertyChanged() {} DerivedStringProperty(String name, String defaultValue); D get(); @Override D getValue(); @Override D getDefaultValue(); @Override String getName(); @Override long getChangedTimestamp(); @Override void addCallback(Runnable callback); @Override void removeAllCallbacks();  }
@Test public void testPropertyChanged() { final AtomicBoolean derived = new AtomicBoolean(false); final String defaultVal = "hi"; DerivedStringProperty p = new DerivedStringProperty("com.netflix.hello", defaultVal) { @Override protected Object derive(String value) { derived.set(true); return String.format("%s/derived", value); } }; p.propertyChangedInternal(); assertTrue("derive() was not called", derived.get()); String derivedDefault = String.format("%s/derived", defaultVal); assertEquals(derivedDefault, p.get()); assertEquals(derivedDefault, p.getDefaultValue()); }