code: @Override
      public MediaType mediaType() {
          Collection<MediaType> types = mediaTypes();
          if (types == null || types.isEmpty()) {
              return MediaType.ANY_TEXT_TYPE;
          } else if (types.size() == 1 && types.iterator().next().equals(MediaType.ANY_TYPE)) {
              return MediaType.ANY_TEXT_TYPE;
          } else {
              return types.iterator().next();
          }
      }
docs: Get the preferred content media type that is acceptable for the client. For instance, in Accept: text/*;q=0.3,
  text/html;q=0.7, text/html;level=1,text/html;level=2;q=0.4, text/html is returned.
  <p/>
  The Accept request-header field can be used to specify certain media
  types which are acceptable for the response. Accept headers can be used
  to indicate that the request is specifically limited to a small set of
  desired types, as in the case of a request for an in-line image.
  
  @return a MediaType that is acceptable for the
  client or {@see MediaType#HTML_UTF_8} if not set
  @see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"
  >http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</a>