code: @Override
      public void addInstanceChangeListener(String serviceName, ServiceInstanceChangeListener listener) throws ServiceException {
          ServiceInstanceUtils.validateManagerIsStarted(isStarted.get());
          ServiceInstanceUtils.validateServiceName(serviceName);
          if (listener == null) {
              throw new ServiceException(ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR,
                      ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR.getMessageTemplate(),
                      "ServiceInstanceChangeListener");
          }
          ModelService service = getLookupService().getModelService(serviceName);
          if (service == null) {
              throw new ServiceException(ErrorCode.SERVICE_DOES_NOT_EXIST,ErrorCode.SERVICE_DOES_NOT_EXIST.getMessageTemplate(),serviceName);
          }
          getLookupService().addServiceInstanceChangeListener(serviceName, listener);
      }
docs: Add a ServiceInstanceChangeListener to the Service.
  
  This method will check the duplicated listener for the serviceName, if the listener
  already exists for the serviceName, do nothing.
  
  Throws IllegalArgumentException if serviceName or listener is null.
  
  @param serviceName
  the service name
  @param listener
  the ServiceInstanceChangeListener for the service
  @throws ServiceException