}
} );
final YieldTermStructure implied = new ImpliedTermStructure<YieldTermStructure>(h, newSettlement);
final Flag flag = new Flag();
implied.addObserver(flag);
// TODO: initialization needed (dependent of PiecewiseYieldCurve)
// h.setLink(termStructure);
// -------------------------------------------------------------------------------------------------------------
// FIXME: This code was added instead. Please remove when PiecewiseYieldCurve becomes ready
//
final Quote quote = new SimpleQuote(100.0);
final Flag anotherFlag = new Flag();
quote.addObserver(anotherFlag);
h.linkTo(new FlatForward(today, new Handle<Quote>(quote), new Actual360()));
if (!anotherFlag.isUp()) {
fail("Observer was not notified of term structure change");
}
if (!flag.isUp()) {
fail("Observer was not notified of term structure change");