code: protected int getNumberOfSelectedMessages(HttpMessageContainer httpMessageContainer) {
          if (httpMessageContainer instanceof SelectableHttpMessagesContainer) {
              return ((SelectableHttpMessagesContainer) httpMessageContainer).getNumberOfSelectedMessages();
          } else if (httpMessageContainer instanceof SingleHttpMessageContainer) {
              return ((SingleHttpMessageContainer) httpMessageContainer).isEmpty() ? 0 : 1;
          }
  
          return 0;
      }
docs: Returns the number of selected messages of the given message container.
  <p>
  By default it returns the number of selected messages from {@code SelectableHttpMessagesContainer}s and for
  {@code SingleHttpMessageContainer}s returns 1 if it contains a message, 0 otherwise.
  </p>
  <p>
  Normally overridden if other implementations of {@code HttpMessageContainer} are supported. Default are
  {@code SingleHttpMessageContainer} and {@code SelectableHttpMessagesContainer}.
  </p>
  
  @param httpMessageContainer the container that will be evaluated
  @return the number of selected messages in the message container
  @see SingleHttpMessageContainer
  @see SelectableHttpMessagesContainer