code: public boolean isServiceRegistered(final String serviceId) {
          Map<String, Service> serviceIdToService = getServices();
          return serviceIdToService.containsKey(serviceId);
      }
docs: Checks to see if a service is registered with the local agent..
  
  @param serviceId service id
  @return <code>true</code> if a particular service is registered with
  the local Consul agent, otherwise <code>false</code>.