@Test
public void testAddReservation() {

  Plan plan = new InMemoryPlan(queueMetrics, policy, agent, totalCapacity, 1L,
      resCalc, minAlloc, maxAlloc, planName, replanner, true, context);
  ReservationId reservationID =
      ReservationSystemTestUtil.getNewReservationId();
  int[] alloc = { 10, 10, 10, 10, 10, 10 };
  int start = 100;
  ReservationAllocation rAllocation =
      createReservationAllocation(reservationID, start, alloc);
  Assert.assertNull(plan.getReservationById(reservationID));
  try {
    plan.addReservation(rAllocation, false);
  } catch (PlanningException e) {
    Assert.fail(e.getMessage());
  }
  doAssertions(plan, rAllocation);
  checkAllocation(plan, alloc, start, 0);
}