docs: @Override
      public ServiceInstance queryInstanceByKey(ServiceInstanceQuery query)
              throws ServiceException {
          if(! isStarted){
              ServiceDirectoryError error = new ServiceDirectoryError(ErrorCode.SERVICE_DIRECTORY_MANAGER_FACTORY_CLOSED);
              throw new ServiceException(error);
          }
  //        validateServiceInstanceQuery(query);
  
          if(query == null ){
              throw new IllegalArgumentException("ServiceInstanceQuery cannot be null.");
          }
  
          if(query.getCriteria() == null || query.getCriteria().size() == 0){
              return null;
          }
  
          MetadataQueryRRLoadBalancer lb = lbManager.getMetadataQueryRRLoadBalancer(query);
          return lb.vote();
      }