code: public static RestDocumentService discover() {
          String serviceUrl = discoverServiceUrl("document", DEFAULT_DOCUMENT_SERVICE_PORT, new HealthCheck() {
              @Override
              public void check(String serviceUrl) {
                  new RestDocumentService<>(serviceUrl).count(RestDocumentServiceConnectivityTest.class);
              }
          });
          return new RestDocumentService<>(serviceUrl);
      }
docs: Factory methods