CurveDataPointShifts implements ScenarioArgument<CurveDataPointShifts, CurveDataPointShiftsDecorator> { public static CurveDataPointShifts relative(CurveSpecificationMatcher matcher, PointShift... shifts) { return new Relative(matcher, Arrays.asList(shifts)); } protected  CurveDataPointShifts(CurveSpecificationMatcher matcher, List<PointShift> shifts); @Override Class<CurveDataPointShiftsDecorator> getFunctionType(); Result<Map<ExternalIdBundle, Double>> apply(CurveSpecification curveSpec, Map<ExternalIdBundle, Double> values); static CurveDataPointShifts absolute(CurveSpecificationMatcher matcher, PointShift... shifts); static CurveDataPointShifts absolute(CurveSpecificationMatcher matcher, List<PointShift> shifts); static CurveDataPointShifts relative(CurveSpecificationMatcher matcher, PointShift... shifts); static CurveDataPointShifts relative(CurveSpecificationMatcher matcher, List<PointShift> shifts);  }
@Test public void relative() { CurveDataPointShifts shifts = CurveDataPointShifts.relative(MATCHER, SHIFT_LIST); Result<Map<ExternalIdBundle, Double>> result = shifts.apply(CurveTestUtils.CURVE_SPEC, CurveTestUtils.VALUE_MAP); assertTrue(result.isSuccess()); CurveTestUtils.checkValues(result.getValue(), 0.11, 0.24, 0.61, 0.56); }