code: String getRestMethod(JMethod method) throws UnableToCompleteException {
          String restMethod = null;
  
          Annotation[] annotations = method.getAnnotations();
          for (Annotation annotation : annotations) {
              HttpMethod httpMethod = annotation.annotationType().getAnnotation(HttpMethod.class);
              // Check is HttpMethod
              if (null != httpMethod) {
                  if (null != restMethod) {
                      // Error, see description of HttpMethod
                      getLogger().log(ERROR,
                          "Invalid method. It is an error for a method to be annotated with more than one annotation " +
                              "that is annotated with HttpMethod: " + method.getReadableDeclaration());
                      throw new UnableToCompleteException();
                  }
                  restMethod = httpMethod.value();
              }
          }
  
          if (null != restMethod) {
              // Allow custom methods later?
              restMethod = restMethod.toLowerCase();
              if (!REST_METHODS.contains(restMethod)) {
                  getLogger().log(ERROR, "Invalid rest method. It must have a javax rs method annotation: " +
                      method.getReadableDeclaration());
                  throw new UnableToCompleteException();
              }
          } else if (null != getAnnotation(method, JSONP.class)) {
              restMethod = METHOD_JSONP;
          } else {
              restMethod = method.getName();
              if (!REST_METHODS.contains(restMethod)) {
                  getLogger().log(ERROR,
                      "Invalid rest method. It must either have a lower case rest method name or have a javax rs method" +
                          " annotation: " + method.getReadableDeclaration());
                  throw new UnableToCompleteException();
              }
          }
  
          return restMethod;
      }
docs: Returns the rest method.
  <p />
  Iterates over the annotations and look for an annotation that is annotated with HttpMethod.
  
  @param method
  @return the rest method.
  @throws UnableToCompleteException
  <ul>
  <li>If more than one annotation that is annotated with HttpMethod is present,</li>
  <li>an invalid jax-rs method annotation is found or</li>
  <li>no annotation was found and the method name does not match a valid jax-rs method</li>
  </ul>
  Valid means it is in the set {@link #REST_METHODS}