@Test
public void testOrderNoGap() throws PlanningException {

  prepareBasicPlan();
  // create a chain of 4 RR, mixing gang and non-gang
  ReservationDefinition rr = new ReservationDefinitionPBImpl();
  rr.setArrival(0 * step);
  rr.setDeadline(60 * step);
  rr.setRecurrenceExpression(recurrenceExpression);
  ReservationRequests reqs = new ReservationRequestsPBImpl();
  reqs.setInterpreter(ReservationRequestInterpreter.R_ORDER_NO_GAP);
  ReservationRequest r = ReservationRequest.newInstance(
      Resource.newInstance(2048, 2), 10, 1, 10 * step);
  ReservationRequest r2 = ReservationRequest.newInstance(
      Resource.newInstance(1024, 1), 10, 10, 20 * step);
  List<ReservationRequest> list = new ArrayList<ReservationRequest>();
  list.add(r);
  list.add(r2);
  list.add(r);
  list.add(r2);
  reqs.setReservationResources(list);
  rr.setReservationRequests(reqs);
  rr.setReservationRequests(reqs);
  // submit to agent
  ReservationId reservationID = ReservationSystemTestUtil
      .getNewReservationId();
  agent.createReservation(reservationID, "u1", plan, rr);
  System.out.println("--------AFTER ORDER ALLOCATION (queue: "
      + reservationID + ")----------");
  System.out.println(plan.toString());
  System.out.println(plan.toCumulativeString());
  // validate
  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, 0 * step, 10 * step, 20, 1024, 1));
  assertTrue(cs.toString(), check(cs, 10 * step, 30 * step, 10, 1024, 1));
  assertTrue(cs.toString(), check(cs, 30 * step, 40 * step, 20, 1024, 1));
  assertTrue(cs.toString(), check(cs, 40 * step, 60 * step, 10, 1024, 1));
}