code: private void validatePossibleEndpoint(String possibleEndpoint) throws IllegalArgumentException {
          if (!possibleEndpoint.contains(":")) {
              throw new IllegalArgumentException(RESTClientMessagesUtil.getMessage(RESTClientMessagesUtil.INVALID_ENDPOINT, possibleEndpoint));
          }
          String[] components = possibleEndpoint.split(":");
          if (components.length != 2) {
              throw new IllegalArgumentException(RESTClientMessagesUtil.getMessage(RESTClientMessagesUtil.INVALID_ENDPOINT, possibleEndpoint));
          }
          try {
              Integer.valueOf(components[1]);
          } catch (NumberFormatException e) {
              throw new IllegalArgumentException(RESTClientMessagesUtil.getMessage(RESTClientMessagesUtil.INVALID_ENDPOINT, possibleEndpoint));
          }
      }
docs: Validate the possible endpoint String.
  
  @param possibleEndpoint
  @throws IllegalArgumentException if the String is not a valid endpoint