//------------------------------------------------------------------------- public virtual void test_convertedTo() { double sensi = 32d; ZeroRateSensitivity @base = ZeroRateSensitivity.of(GBP, YEARFRAC, sensi); double rate = 1.5d; FxMatrix matrix = FxMatrix.of(CurrencyPair.of(GBP, USD), rate); ZeroRateSensitivity test1 = (ZeroRateSensitivity)@base.convertedTo(USD, matrix); ZeroRateSensitivity expected = ZeroRateSensitivity.of(GBP, YEARFRAC, USD, rate * sensi); assertEquals(test1, expected); ZeroRateSensitivity test2 = (ZeroRateSensitivity)@base.convertedTo(GBP, matrix); assertEquals(test2, @base); }