code: public void setEndpoints(String notify, String sessions) throws IllegalArgumentException {
          if (notify == null || notify.isEmpty()) {
              throw new IllegalArgumentException("Notify endpoint cannot be empty or null.");
          } else {
              if (delivery instanceof HttpDelivery) {
                  ((HttpDelivery) delivery).setEndpoint(notify);
              } else {
                  LOGGER.warn("Delivery is not instance of HttpDelivery, cannot set notify endpoint");
              }
          }
  
          boolean invalidSessionsEndpoint = sessions == null || sessions.isEmpty();
          String sessionEndpoint = null;
  
          if (invalidSessionsEndpoint && this.autoCaptureSessions.get()) {
              LOGGER.warn("The session tracking endpoint has not been"
                      + " set. Session tracking is disabled");
              this.autoCaptureSessions.set(false);
          } else {
              sessionEndpoint = sessions;
          }
  
          if (sessionDelivery instanceof HttpDelivery) {
              // sessionEndpoint may be invalid (e.g. typo in the protocol) here, which
              // should result in the default
              // HttpDelivery throwing a MalformedUrlException which prevents delivery.
              ((HttpDelivery) sessionDelivery).setEndpoint(sessionEndpoint);
          } else {
              LOGGER.warn("Delivery is not instance of HttpDelivery, cannot set sessions endpoint");
          }
      }
docs: Set the endpoints to send data to. By default we'll send error reports to
  https://notify.bugsnag.com, and sessions to https://sessions.bugsnag.com, but you can
  override this if you are using Bugsnag Enterprise to point to your own Bugsnag endpoint.
  
  Please note that it is recommended that you set both endpoints. If the notify endpoint is
  missing, an exception will be thrown. If the session endpoint is missing, a warning will be
  logged and sessions will not be sent automatically.
  
  Note that if you are setting a custom {@link Delivery}, this method should be called after
  the custom implementation has been set.
  
  @param notify the notify endpoint
  @param sessions the sessions endpoint
  
  @throws IllegalArgumentException if the notify endpoint is empty or null