code: public static List<HistoryDTO> transformToDto(List<History> list) {
          if (list == null) {
              throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR);
          }
  
          List<HistoryDTO> result = new ArrayList<HistoryDTO>();
  
          for (History history : list) {
              result.add(transformToDto(history));
          }
          return result;
      }
docs: Converts a list of history entities to DTOs.
  
  @param   list  The list of entities.
  
  @return  The list of DTOs.
  
  @throws  WebApplicationException  If an error occurs.