public virtual void test_ofDeltaAmount()
        {
            ValueAdjustment test = ValueAdjustment.ofDeltaAmount(20);

            assertEquals(test.ModifyingValue, 20, TOLERANCE);
            assertEquals(test.Type, ValueAdjustmentType.DELTA_AMOUNT);
            assertEquals(test.adjust(100), 120, TOLERANCE);
            assertEquals(test.ToString(), "ValueAdjustment[result = input + 20.0]");
        }
        public virtual void test_resolveValues_dateBased_ignoreExcess()
        {
            ValueStep     step1 = ValueStep.of(date(2014, 2, 1), ValueAdjustment.ofReplace(300d));
            ValueStep     step2 = ValueStep.of(date(2014, 2, 15), ValueAdjustment.ofReplace(300d));   // no change to value
            ValueStep     step3 = ValueStep.of(date(2014, 3, 1), ValueAdjustment.ofReplace(400d));
            ValueStep     step4 = ValueStep.of(date(2014, 3, 15), ValueAdjustment.ofDeltaAmount(0d)); // no change to value
            ValueStep     step5 = ValueStep.of(date(2014, 4, 1), ValueAdjustment.ofMultiplier(1d));
            ValueSchedule test  = ValueSchedule.of(200d, ImmutableList.of(step1, step2, step3, step4, step5));

            assertEquals(test.resolveValues(SCHEDULE), DoubleArray.of(200d, 300d, 400d));
        }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            ValueStepSequence seq = ValueStepSequence.of(date(2014, 2, 1), date(2014, 3, 1), Frequency.P1M, ValueAdjustment.ofDeltaAmount(100));

            ValueSchedule test = ValueSchedule.of(10000d, Lists.newArrayList(STEP1, STEP2));

            coverImmutableBean(test);
            coverBeanEquals(test, ValueSchedule.of(20000d, seq));
        }
        public virtual void test_resolveValues_sequenceAndStepClash()
        {
            ValueStepSequence seq   = ValueStepSequence.of(date(2014, 2, 1), date(2014, 3, 1), Frequency.P1M, ValueAdjustment.ofDeltaAmount(100));
            ValueStep         step1 = ValueStep.of(date(2014, 2, 1), ValueAdjustment.ofReplace(350d));
            ValueSchedule     test  = ValueSchedule.builder().initialValue(200d).steps(step1).stepSequence(seq).build();

            assertThrowsIllegalArg(() => test.resolveValues(SCHEDULE));
        }
        public virtual void test_resolveValues_sequenceAndSteps()
        {
            ValueStepSequence seq   = ValueStepSequence.of(date(2014, 2, 1), date(2014, 3, 1), Frequency.P1M, ValueAdjustment.ofDeltaAmount(100));
            ValueStep         step1 = ValueStep.of(date(2014, 1, 1), ValueAdjustment.ofReplace(350d));
            ValueSchedule     test  = ValueSchedule.builder().initialValue(200d).steps(step1).stepSequence(seq).build();

            assertEquals(test.resolveValues(SCHEDULE), DoubleArray.of(350d, 450d, 550d));
        }
        //-------------------------------------------------------------------------
        public virtual void test_resolveValues_sequence()
        {
            ValueStepSequence seq  = ValueStepSequence.of(date(2014, 2, 1), date(2014, 3, 1), Frequency.P1M, ValueAdjustment.ofDeltaAmount(100));
            ValueSchedule     test = ValueSchedule.of(200d, seq);

            assertEquals(test.resolveValues(SCHEDULE), DoubleArray.of(200d, 300d, 400d));
        }
        public virtual void test_builder_validFull()
        {
            ValueStepSequence seq  = ValueStepSequence.of(date(2016, 4, 20), date(2016, 10, 20), Frequency.P3M, ValueAdjustment.ofDeltaAmount(-100));
            ValueSchedule     test = ValueSchedule.builder().initialValue(2000d).steps(STEP1, STEP2).stepSequence(seq).build();

            assertEquals(test.InitialValue, 2000d, TOLERANCE);
            assertEquals(test.Steps, ImmutableList.of(STEP1, STEP2));
            assertEquals(test.StepSequence, seq);
        }
        public virtual void test_of_sequence()
        {
            ValueStepSequence seq  = ValueStepSequence.of(date(2016, 4, 20), date(2016, 10, 20), Frequency.P3M, ValueAdjustment.ofDeltaAmount(-100));
            ValueSchedule     test = ValueSchedule.of(10000d, seq);

            assertEquals(test.InitialValue, 10000d, TOLERANCE);
            assertEquals(test.Steps, ImmutableList.of());
            assertEquals(test.StepSequence, seq);
        }