docs: @Override
      public List<ServiceInstance> getAllInstances() throws ServiceException {
          if(! isStarted){
              ServiceDirectoryError error = new ServiceDirectoryError(ErrorCode.SERVICE_DIRECTORY_MANAGER_FACTORY_CLOSED);
              throw new ServiceException(error);
          }
  
          List<ServiceInstance> instances = null;
  
          List<ModelServiceInstance> allInstances = getLookupService().getAllInstances();
          for(ModelServiceInstance serviceInstance : allInstances){
              if(instances == null){
                  instances = new ArrayList<ServiceInstance>();
              }
              instances.add(ServiceInstanceUtils.transferFromModelServiceInstance(serviceInstance));
          }
  
          if(instances == null){
              return Collections.emptyList();
          }
  
          return instances;
      }