code: public static CompletableFuture<EndpointDescription[]> getEndpoints(String endpointUrl) {
          UaTcpStackClientConfig config = UaTcpStackClientConfig.builder()
                  .setEndpointUrl(endpointUrl)
                  .build();
  
          UaTcpStackClient client = new UaTcpStackClient(config);
  
          GetEndpointsRequest request = new GetEndpointsRequest(
                  new RequestHeader(null, DateTime.now(), uint(1), uint(0), null, uint(5000), null),
                  endpointUrl, null, new String[]{Stack.UA_TCP_BINARY_TRANSPORT_URI});
  
          return client.<GetEndpointsResponse>sendRequest(request)
                  .whenComplete((r, ex) -> client.disconnect())
                  .thenApply(GetEndpointsResponse::getEndpoints);
      }
docs: Query the GetEndpoints service at the given endpoint URL.
  
  @param endpointUrl the endpoint URL to get endpoints from.
  @return the {@link EndpointDescription}s returned by the GetEndpoints service.