private TestScenario buildTestScenarioPrePaidBackDatedQuantityIncreaseForBIlledPeriod() {
    TestScenario scenario = prePaidNonProRate();
    TestOrderChangeBuilder change;
    Expectation expected;

    change = scenario.getChangeBuilder().applicationDate("01/01/2015").quantity(2.0).price(5.0);
    scenario.addChange(change, AsDate(2015, 1, 1));
    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 2, 1))
            .nextInvoiceDate(AsDate(2015, 2, 1))
            .invoiceTotal(new BigDecimal("10.00"));
    scenario.addExpecation(expected, AsDate(2015, 1, 1));

    change = scenario.getChangeBuilder().applicationDate("01/15/2015").quantity(1.0).price(5.0);
    scenario.addChange(change, AsDate(2015, 2, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 3, 1))
            .nextInvoiceDate(AsDate(2015, 3, 1))
            .invoiceTotal(new BigDecimal("20.00"));
    scenario.addExpecation(expected, AsDate(2015, 2, 1));

    return scenario;
  }
  private TestScenario buildTestScenarioPrePaidPriceAndQuantityIncreaseForUnbIlledPeriod() {
    TestScenario scenario = prePaid();
    TestOrderChangeBuilder change;
    Expectation expected;

    change = scenario.getChangeBuilder().applicationDate("01/01/2015").quantity(10.0).price(5.0);
    scenario.addChange(change, AsDate(2015, 1, 1));
    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 2, 1))
            .nextInvoiceDate(AsDate(2015, 2, 1))
            .invoiceTotal(new BigDecimal("50.00"));
    scenario.addExpecation(expected, AsDate(2015, 1, 1));

    change = scenario.getChangeBuilder().applicationDate("02/20/2015").quantity(2.0).price(6.0);
    scenario.addChange(change, AsDate(2015, 2, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 3, 1))
            .nextInvoiceDate(AsDate(2015, 3, 1))
            .invoiceTotal(new BigDecimal("57.07" /* "56.27" */));
    scenario.addExpecation(expected, AsDate(2015, 2, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 4, 1))
            .nextInvoiceDate(AsDate(2015, 4, 1))
            .invoiceTotal(new BigDecimal("72.00"));
    scenario.addExpecation(expected, AsDate(2015, 3, 1));

    return scenario;
  }
  private TestScenario buildTestScenarioPriceIncreaseForBIlledPeriod() {
    TestScenario scenario = postPaid();
    TestOrderChangeBuilder change;
    Expectation expected;

    change = scenario.getChangeBuilder().applicationDate("01/05/2015").quantity(10.0).price(5.0);
    scenario.addChange(change, AsDate(2015, 1, 1));
    expected =
        new Expectation().nextBillableDay(AsDate(2015, 1, 1)).nextInvoiceDate(AsDate(2015, 2, 1));
    scenario.addExpecation(expected, AsDate(2015, 1, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 2, 1))
            .nextInvoiceDate(AsDate(2015, 3, 1))
            .invoiceTotal(new BigDecimal("43.55" /* "41.93" */));
    scenario.addExpecation(expected, AsDate(2015, 2, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 3, 1))
            .nextInvoiceDate(AsDate(2015, 4, 1))
            .invoiceTotal(new BigDecimal("50.00"));
    scenario.addExpecation(expected, AsDate(2015, 3, 1));

    change = scenario.getChangeBuilder().applicationDate("01/15/2015").quantity(0.0).price(6.0);
    scenario.addChange(change, AsDate(2015, 4, 1));
    change = scenario.getChangeBuilder().applicationDate("02/25/2015").quantity(0.0).price(10.0);
    scenario.addChange(change, AsDate(2015, 4, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 4, 1))
            .nextInvoiceDate(AsDate(2015, 5, 1))
            .invoiceTotal(new BigDecimal("121.20" /* "119.44" */));
    scenario.addExpecation(expected, AsDate(2015, 4, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 5, 1))
            .nextInvoiceDate(AsDate(2015, 6, 1))
            .invoiceTotal(new BigDecimal("100.00"));
    scenario.addExpecation(expected, AsDate(2015, 5, 1));

    return scenario;
  }
  private TestScenario buildTestScenarioPriceAndQuantityDecreaseForUnbIlledPeriod() {
    TestScenario scenario = postPaid();
    TestOrderChangeBuilder change;
    Expectation expected;

    change = scenario.getChangeBuilder().applicationDate("01/01/2015").quantity(10.0).price(5.0);
    scenario.addChange(change, AsDate(2015, 1, 1));
    expected =
        new Expectation().nextBillableDay(AsDate(2015, 1, 1)).nextInvoiceDate(AsDate(2015, 2, 1));
    scenario.addExpecation(expected, AsDate(2015, 1, 1));

    change = scenario.getChangeBuilder().applicationDate("01/15/2015").quantity(-2.0).price(4.0);
    scenario.addChange(change, AsDate(2015, 2, 1));
    change = scenario.getChangeBuilder().applicationDate("02/25/2015").quantity(-2.0).price(3.0);
    scenario.addChange(change, AsDate(2015, 2, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 2, 1))
            .nextInvoiceDate(AsDate(2015, 3, 1))
            .invoiceTotal(new BigDecimal("40.13" /* "40.72" */));
    scenario.addExpecation(expected, AsDate(2015, 2, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 3, 1))
            .nextInvoiceDate(AsDate(2015, 4, 1))
            .invoiceTotal(new BigDecimal("30.00" /* "30.51" */));
    scenario.addExpecation(expected, AsDate(2015, 3, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 4, 1))
            .nextInvoiceDate(AsDate(2015, 5, 1))
            .invoiceTotal(new BigDecimal("18.00"));
    scenario.addExpecation(expected, AsDate(2015, 4, 1));

    return scenario;
  }
  private TestScenario buildTestScenarioPriceIncreaseForUnbIlledPeriod() {
    TestScenario scenario = postPaid();
    TestOrderChangeBuilder change;
    Expectation expected;

    change = scenario.getChangeBuilder().applicationDate("01/05/2015").quantity(10.0).price(5.0);
    scenario.addChange(change, AsDate(2015, 1, 1));
    expected =
        new Expectation().nextBillableDay(AsDate(2015, 1, 1)).nextInvoiceDate(AsDate(2015, 2, 1));
    scenario.addExpecation(expected, AsDate(2015, 1, 1));

    change = scenario.getChangeBuilder().applicationDate("01/25/2015").quantity(0.0).price(7.0);
    scenario.addChange(change, AsDate(2015, 2, 1));
    change = scenario.getChangeBuilder().applicationDate("02/15/2015").quantity(0.0).price(9.0);
    scenario.addChange(change, AsDate(2015, 2, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 2, 1))
            .nextInvoiceDate(AsDate(2015, 3, 1))
            .invoiceTotal(new BigDecimal("48.06" /* "45.80" */));
    scenario.addExpecation(expected, AsDate(2015, 2, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 3, 1))
            .nextInvoiceDate(AsDate(2015, 4, 1))
            .invoiceTotal(new BigDecimal("80.00" /* "79.28" */));
    scenario.addExpecation(expected, AsDate(2015, 3, 1));

    expected =
        new Expectation()
            .nextBillableDay(AsDate(2015, 4, 1))
            .nextInvoiceDate(AsDate(2015, 5, 1))
            .invoiceTotal(new BigDecimal("90.00"));
    scenario.addExpecation(expected, AsDate(2015, 4, 1));

    return scenario;
  }