public ReservationView(
      Reservation reservation,
      ElementActionView deleteActionView,
      ElementActionView modifyActionView,
      ElementActionView copyActionView) {
    this.id = reservation.getId();
    this.virtualResourceGroup =
        reservation.getVirtualResourceGroup().map(g -> g.getName()).orElse("-");
    this.sourcePort = new PortView(reservation.getSourcePort());
    this.destinationPort = new PortView(reservation.getDestinationPort());
    // `<c:out>` strips newlines, so we have to manually HTML escape.
    this.failedReason = HtmlUtils.htmlEscape(reservation.formattedFailedReason(), "UTF-8");
    this.cancelReason = HtmlUtils.htmlEscape(reservation.getCancelReason(), "UTF-8");
    this.startDateTime = reservation.getStartDateTime();
    this.endDateTime = reservation.getEndDateTime().orElse(null);
    this.bandwidth = reservation.getBandwidth();
    this.userCreated = reservation.getUserCreated();
    this.providerConnectionId = reservation.getProviderConnectionId();
    this.creationDateTime = reservation.getCreationDateTime();
    this.protectionType = reservation.getRequesterConnection().getProtectionType();
    this.name = reservation.getName();
    NsiRequesterConnection connection = reservation.getRequesterConnection();
    this.requesterConnectionId = connection.getConnectionId();
    this.ero = presentEro(connection);

    states = connection.getStates().toShortString();
    reservationState = connection.getReservationState();
    provisionState = connection.getProvisionState().orElse(null);
    lifecycleState = connection.getLifecycleState();
    dataPlaneActive = connection.isDataPlaneActive();

    this.deleteActionView = deleteActionView;
    this.modifyActionView = modifyActionView;
    this.copyActionView = copyActionView;
  }
  @Test
  @Ignore
  public void shouldCreateReservation() {
    PhysicalPort sourcePort = createPort("SAP-00:03:18:58:ce:20-8", "00:03:18:58:ce:20", "1-1-1-8");
    PhysicalPort destPort = createPort("SAP-00:03:18:58:ce:20-4", "00:03:18:58:ce:20", "1-1-1-8");

    Reservation reservation =
        new ReservationFactory()
            .setReservationId("SURFnetTest3")
            .setStartDateTime(DateTime.now().plusMinutes(2))
            .setEndDateTime(DateTime.now().plusMinutes(20))
            .setName("mtosiSurfTest5")
            .create();

    reservation.getSourcePort().setPhysicalPort(sourcePort);
    reservation.getDestinationPort().setPhysicalPort(destPort);

    Reservation savedReservation = subject.reserve(reservation, false);

    System.err.println(savedReservation);
  }