@Test
public void testConvertAllocationsToReservationInfo() {

  long startTime = new Date().getTime();
  long step = 10000;
  int[] alloc = {10, 10, 10};
  ReservationId id = ReservationSystemTestUtil.getNewReservationId();
  ReservationAllocation allocation = createReservationAllocation(
          startTime, startTime + 10 * step, step, alloc, id,
          createResource(4000, 2));
  List<ReservationAllocationState> infoList = ReservationSystemUtil
          .convertAllocationsToReservationInfo(
            Collections.singleton(allocation), true);
  assertThat(infoList).hasSize(1);
  assertThat(infoList.get(0).getReservationId().toString()).isEqualTo(
      id.toString());
  Assert.assertFalse(infoList.get(0).getResourceAllocationRequests()
          .isEmpty());
}