code: public static List<NotificationDto> transformToDto(List<Notification> notifications) {
          if (notifications == null) {
              throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR);
          }
  
          List<NotificationDto> result = new ArrayList<NotificationDto>();
  
          for (Notification notification : notifications) {
              result.add(transformToDto(notification));
          }
          return result;
      }
docs: Converts list of notification entity objects to list of notificationDto objects.
  
  @param   notifications  list of notification objects. Cannot be null.
  
  @return  list of notificationDto objects
  
  @throws  WebApplicationException  If an error occurs.