YieldCurveManipulatorBuilder { public final YieldCurveManipulatorBuilder bucketedShifts(ScenarioShiftType shiftType, YieldCurveBucketedShift... shifts) { ArgumentChecker.notNull(shiftType, "shiftType"); ArgumentChecker.notEmpty(shifts, "shifts"); YieldCurveBucketedShiftManipulator manipulator = new YieldCurveBucketedShiftManipulator(shiftType, Arrays.asList(shifts)); _scenario.add(_selector, manipulator); return this; } YieldCurveManipulatorBuilder(YieldCurveSelector selector, Scenario scenario); YieldCurveSelector getSelector(); Scenario getScenario(); YieldCurveManipulatorBuilder parallelShift(ScenarioShiftType shiftType, Number shift); @Deprecated YieldCurveManipulatorBuilder parallelShift(Number shift); YieldCurveManipulatorBuilder singleShift(Number t, Number shift); final YieldCurveManipulatorBuilder bucketedShifts(ScenarioShiftType shiftType, YieldCurveBucketedShift... shifts); final YieldCurveManipulatorBuilder pointShifts(ScenarioShiftType shiftType, YieldCurvePointShift... shifts);  }
@Test public void bucketedShifts() { _builder.bucketedShifts(ScenarioShiftType.ABSOLUTE, bucketedShift(Period.ofYears(1), Period.ofYears(2), 3)); YieldCurveBucketedShiftManipulator result = (YieldCurveBucketedShiftManipulator) _manipulatorResult; assertTrue("One shift expected", 1 == result.getShifts().size()); YieldCurveBucketedShift shift = result.getShifts().get(0); assertEquals(Period.ofYears(1), shift.getStart()); assertEquals(Period.ofYears(2), shift.getEnd()); assertEquals(3., shift.getShift()); }