@Override
  public ImmutableList<PluginDefinition> getAllPlugins() {
    try {
      if (checkHealthWithBackoffs()) {
        logger.atInfo().log("Getting language server plugins...");
        var listPluginsResponse =
            service
                .listPluginsWithDeadline(ListPluginsRequest.getDefaultInstance(), DEFAULT_DEADLINE)
                .get();
        // Note: each plugin service client has a dedicated RemoteVulnDetectorImpl instance,
        // so we can safely set this flag here.
        this.wantCompactRunRequest = listPluginsResponse.getWantCompactRunRequest();
        return ImmutableList.copyOf(listPluginsResponse.getPluginsList());
      } else {
        return ImmutableList.of();
      }
    } catch (InterruptedException | ExecutionException e) {
      throw new LanguageServerException("Failed to get response from language server.", e);
    }
  }
@Test
  public void getAllPlugins_withNonServingServer_returnsEmptyList() throws Exception {
    registerHealthCheckWithStatus(ServingStatus.NOT_SERVING);
    assertThat(getNewRemoteVulnDetectorInstance().getAllPlugins()).isEmpty();
  }