public virtual void check_pv_sensitivity()
        {
            ImmutableRatesProvider multicurve = CALIBRATOR.calibrate(GROUP_DEFINITION_PV_SENSI, MARKET_QUOTES, REF_DATA);
            // the trades used for calibration
            IDictionary <CurveName, IList <Trade> >         trades         = new Dictionary <CurveName, IList <Trade> >();
            IDictionary <CurveName, IList <ResolvedTrade> > resolvedTrades = new Dictionary <CurveName, IList <ResolvedTrade> >();
            ImmutableList <CurveDefinition> curveGroups = GROUP_DEFINITION.CurveDefinitions;

            ImmutableList.Builder <CurveParameterSize> builder = ImmutableList.builder();
            foreach (CurveDefinition entry in curveGroups)
            {
                ImmutableList <CurveNode> nodes               = entry.Nodes;
                IList <Trade>             tradesCurve         = new List <Trade>();
                IList <ResolvedTrade>     resolvedTradesCurve = new List <ResolvedTrade>();
                foreach (CurveNode node in nodes)
                {
                    tradesCurve.Add(node.trade(1d, MARKET_QUOTES, REF_DATA));
                    resolvedTradesCurve.Add(node.resolvedTrade(1d, MARKET_QUOTES, REF_DATA));
                }
                trades[entry.Name]         = tradesCurve;
                resolvedTrades[entry.Name] = resolvedTradesCurve;
                builder.add(entry.toCurveParameterSize());
            }
            ImmutableList <CurveParameterSize> order = builder.build();    // order of the curves
            // Check CurveInfo present and sensitivity as expected
            IDictionary <CurveName, DoubleArray> mqsGroup = new Dictionary <CurveName, DoubleArray>();
            int nodeIndex = 0;

            foreach (CurveParameterSize cps in order)
            {
                int      nbParameters = cps.ParameterCount;
                double[] mqsCurve     = new double[nbParameters];
                for (int looptrade = 0; looptrade < nbParameters; looptrade++)
                {
                    DoubleArray mqsNode = PV_MEASURES.derivative(resolvedTrades[cps.Name][looptrade], multicurve, order);
                    mqsCurve[looptrade] = mqsNode.get(nodeIndex);
                    nodeIndex++;
                }
                Optional <Curve> curve = multicurve.findData(cps.Name);
                DoubleArray      pvSensitivityExpected = DoubleArray.ofUnsafe(mqsCurve);
                mqsGroup[cps.Name] = pvSensitivityExpected;
                assertTrue(curve.Present);
                assertTrue(curve.get().Metadata.findInfo(CurveInfoType.PV_SENSITIVITY_TO_MARKET_QUOTE).Present);
                DoubleArray pvSensitivityMetadata = curve.get().Metadata.findInfo(CurveInfoType.PV_SENSITIVITY_TO_MARKET_QUOTE).get();
                assertTrue(pvSensitivityExpected.equalWithTolerance(pvSensitivityMetadata, 1.0E-10));
            }
        }