class RoundRobinLookupStrategy extends AbstractLookupStrategy {

   @Override
   public Object getService() {
      Set<Object> microservices = context.lookupMicroservice(metaData);
      if (microservices.isEmpty()) {
         throw new RuntimeException("No service found for: " + metaData);
      }
      Object[] servicesArray = microservices.toArray();
      index.compareAndSet(Integer.MAX_VALUE, 0);
      return servicesArray[index.getAndIncrement() % servicesArray.length];
   }

}