code: protected List<HistoryReference> getSelectedHistoryReferences(HttpMessageContainer httpMessageContainer) {
          if (httpMessageContainer instanceof SelectableHistoryReferencesContainer) {
              return ((SelectableHistoryReferencesContainer) httpMessageContainer).getSelectedHistoryReferences();
          } else if (httpMessageContainer instanceof SingleHistoryReferenceContainer) {
              SingleHistoryReferenceContainer singleContainer = (SingleHistoryReferenceContainer) httpMessageContainer;
              if (!singleContainer.isEmpty()) {
                  List<HistoryReference> selectedHistoryReferences = new ArrayList<>(1);
                  selectedHistoryReferences.add(singleContainer.getHistoryReference());
                  return selectedHistoryReferences;
              }
          }
  
          return Collections.emptyList();
      }
docs: Returns the selected messages of the given message container.
  <p>
  By default it returns the selected messages from {@code SelectableHistoryReferencesContainer}s and for
  {@code SingleHistoryReferenceContainer}s returns the contained message or empty {@code List} if none.
  </p>
  <p>
  Normally overridden if other implementations of {@code HttpMessageContainer} are supported. Default are
  {@code SingleHistoryReferenceContainer} and {@code SelectableHistoryReferencesContainer}.
  </p>
  
  @param httpMessageContainer the container that will be evaluated
  @return a {@code List} containing the selected messages
  @see #isButtonEnabledForSelectedMessages(List)
  @see #isSelectedMessagesInSessionScope(HttpMessageContainer)
  @see SingleHistoryReferenceContainer
  @see SelectableHistoryReferencesContainer