public virtual void relative()
        {
            ParallelShiftedCurve test = ParallelShiftedCurve.relative(CONSTANT_CURVE, 0.1d);

            assertThat(test.UnderlyingCurve).isEqualTo(CONSTANT_CURVE);
            assertThat(test.ShiftType).isEqualTo(ShiftType.RELATIVE);
            assertThat(test.ShiftAmount).isEqualTo(0.1d);
            assertThat(test.Metadata).isEqualTo(METADATA);
            assertThat(test.Name).isEqualTo(METADATA.CurveName);
            assertThat(test.ParameterCount).isEqualTo(2);
            assertThat(test.getParameter(0)).isEqualTo(3d);
            assertThat(test.getParameter(1)).isEqualTo(0.1d);
            assertThat(test.getParameterMetadata(0)).isEqualTo(ParameterMetadata.empty());
            assertThat(test.getParameterMetadata(1)).isEqualTo(LabelParameterMetadata.of("RelativeShift"));
            assertThat(test.withParameter(0, 5d)).isEqualTo(ParallelShiftedCurve.relative(CONSTANT_CURVE2, 0.1d));
            assertThat(test.withParameter(1, 0.5d)).isEqualTo(ParallelShiftedCurve.relative(CONSTANT_CURVE, 0.5d));
            assertThat(test.withPerturbation((i, v, m) => v + 2d)).isEqualTo(ParallelShiftedCurve.relative(CONSTANT_CURVE2, 2.1d));
            assertThat(test.yValue(0)).isEqualTo(3.3d, offset(1e-10d));
            assertThat(test.yValue(1)).isEqualTo(3.3d, offset(1e-10d));
        }
        //-------------------------------------------------------------------------
        public virtual void absolute()
        {
            ParallelShiftedCurve test = ParallelShiftedCurve.absolute(CONSTANT_CURVE, 1d);

            assertThat(test.UnderlyingCurve).isEqualTo(CONSTANT_CURVE);
            assertThat(test.ShiftType).isEqualTo(ShiftType.ABSOLUTE);
            assertThat(test.ShiftAmount).isEqualTo(1d);
            assertThat(test.Metadata).isEqualTo(METADATA);
            assertThat(test.Name).isEqualTo(METADATA.CurveName);
            assertThat(test.ParameterCount).isEqualTo(2);
            assertThat(test.getParameter(0)).isEqualTo(3d);
            assertThat(test.getParameter(1)).isEqualTo(1d);
            assertThat(test.getParameterMetadata(0)).isEqualTo(ParameterMetadata.empty());
            assertThat(test.getParameterMetadata(1)).isEqualTo(LabelParameterMetadata.of("AbsoluteShift"));
            assertThat(test.withParameter(0, 5d)).isEqualTo(ParallelShiftedCurve.absolute(CONSTANT_CURVE2, 1d));
            assertThat(test.withParameter(1, 0.5d)).isEqualTo(ParallelShiftedCurve.absolute(CONSTANT_CURVE, 0.5d));
            assertThat(test.withPerturbation((i, v, m) => v + 2d)).isEqualTo(ParallelShiftedCurve.absolute(CONSTANT_CURVE2, 3d));
            assertThat(test.yValue(0)).isEqualTo(4d);
            assertThat(test.yValue(1)).isEqualTo(4d);
        }