@Test
public void testSingleSliding() throws PlanningException {

  prepareBasicPlan();
  // create a single request for which we need subsequent (tight) packing.
  ReservationDefinition rr = new ReservationDefinitionPBImpl();
  rr.setArrival(100 * step);
  rr.setDeadline(120 * step);
  rr.setRecurrenceExpression(recurrenceExpression);
  ReservationRequests reqs = new ReservationRequestsPBImpl();
  reqs.setInterpreter(ReservationRequestInterpreter.R_ALL);
  ReservationRequest r = ReservationRequest.newInstance(
      Resource.newInstance(1024, 1), 200, 10, 10 * step);
  List<ReservationRequest> list = new ArrayList<ReservationRequest>();
  list.add(r);
  reqs.setReservationResources(list);
  rr.setReservationRequests(reqs);
  // submit to agent
  ReservationId reservationID = ReservationSystemTestUtil
      .getNewReservationId();
  agent.createReservation(reservationID, "u1", plan, rr);
  // validate results, we expect the second one to be accepted
  assertTrue("Agent-based allocation failed", reservationID != null);
  assertTrue("Agent-based allocation failed", plan.getAllReservations()
      .size() == 3);
  ReservationAllocation cs = plan.getReservationById(reservationID);
  assertTrue(cs.toString(), check(cs, 100 * step, 120 * step, 100, 1024, 1));
  System.out.println("--------AFTER packed ALLOCATION (queue: "
      + reservationID + ")----------");
  System.out.println(plan.toString());
  System.out.println(plan.toCumulativeString());
}