@Override
  public void updateBooking(Identifier id, Booking info)
      throws DataBaseReadWriteException, IdentifierNotFoundException,
      InvalidIdentifierException, InvalidParameterException
  {
    if (id == null) {
      throw  new InvalidIdentifierException("Id is null");
    }
    if (info == null) {
      throw  new InvalidParameterException("info is null");
    }
    if (Bookings.containsKey(id) == false) {
      throw  new IdentifierNotFoundException("Id not found");
    }
    
    Booking currentInfo = Bookings.get(id);
    if (info.getHostelId() != null && info.getHostelId().equals(currentInfo.getHostelId())
        || info.getBedIds() != null && info.getBedIds().equals(currentInfo.getBedIds())
        || info.getBedReservations() != null || info.getBedIds() != null) {
      
      throw  new InvalidParameterException("Modifiation of hostel and schedule not allowed in this version");
    }
    
    Bookings.put(id, new Booking(info));
  }