public void testObservableHandle() {
QL.info("Testing observability of quote handles...");
final SimpleQuote me1 = new SimpleQuote(0.0);
final RelinkableHandle<Quote> h = new RelinkableHandle(me1);
final Flag f = new Flag();
h.addObserver(f);
me1.setValue(3.14);
if (!f.isUp()) {
fail("Observer was not notified of quote change");
}
f.lower();
final SimpleQuote me2 = new SimpleQuote(0.0);
h.linkTo(me2);
if (!f.isUp()) {
fail("Observer was not notified of quote change");
}
}