@Test
public void testAny() throws PlanningException {

  prepareBasicPlan();
  // create an ANY request, with an impossible step (last in list, first
  // considered),
  // and two satisfiable ones. We expect the second one to be returned.
  ReservationDefinition rr = new ReservationDefinitionPBImpl();
  rr.setArrival(100 * step);
  rr.setDeadline(120 * step);
  rr.setRecurrenceExpression(recurrenceExpression);
  ReservationRequests reqs = new ReservationRequestsPBImpl();
  reqs.setInterpreter(ReservationRequestInterpreter.R_ANY);
  ReservationRequest r = ReservationRequest.newInstance(
      Resource.newInstance(1024, 1), 5, 5, 10 * step);
  ReservationRequest r2 = ReservationRequest.newInstance(
      Resource.newInstance(2048, 2), 10, 5, 10 * step);
  ReservationRequest r3 = ReservationRequest.newInstance(
      Resource.newInstance(1024, 1), 110, 110, 10 * step);
  List<ReservationRequest> list = new ArrayList<ReservationRequest>();
  list.add(r);
  list.add(r2);
  list.add(r3);
  reqs.setReservationResources(list);
  rr.setReservationRequests(reqs);
  // submit to agent
  ReservationId reservationID = ReservationSystemTestUtil
      .getNewReservationId();
  boolean res = agent.createReservation(reservationID, "u1", plan, rr);
  // validate results, we expect the second one to be accepted
  assertTrue("Agent-based allocation failed", res);
  assertTrue("Agent-based allocation failed", plan.getAllReservations()
      .size() == 3);
  ReservationAllocation cs = plan.getReservationById(reservationID);
  if (allocateLeft) {
    assertTrue(cs.toString(), check(cs, 100 * step, 110 * step, 5, 1024, 1));
  } else {
    assertTrue(cs.toString(), check(cs, 110 * step, 120 * step, 20, 1024, 1));
  }
  System.out.println("--------AFTER ANY ALLOCATION (queue: " + reservationID
      + ")----------");
  System.out.println(plan.toString());
  System.out.println(plan.toCumulativeString());
}