//------------------------------------------------------------------------- public virtual void test_convertedTo() { FxIndexSensitivity @base = FxIndexSensitivity.of(GBP_USD_WM_OBS, GBP, SENSITIVITY_VALUE); double rate = 1.35d; FxMatrix matrix = FxMatrix.of(CurrencyPair.of(EUR, USD), rate); FxIndexSensitivity test1 = (FxIndexSensitivity)@base.convertedTo(EUR, matrix); FxIndexSensitivity expected = FxIndexSensitivity.of(GBP_USD_WM_OBS, GBP, EUR, SENSITIVITY_VALUE / rate); assertEquals(test1, expected); FxIndexSensitivity test2 = (FxIndexSensitivity)@base.convertedTo(USD, matrix); assertEquals(test2, @base); }