@Override
  public Optional<ComputationConfig> fetchConfig(String computationId) {
    Preconditions.checkArgument(
        !computationId.isEmpty(),
        "computationId is empty. Cannot fetch computation config without a computationId.");

    GetConfigResponse response =
        applianceComputationConfigFetcher.fetchConfig(
            GetConfigRequest.newBuilder().addComputations(computationId).build());

    if (response == null) {
      return Optional.empty();
    }

    for (Windmill.GetConfigResponse.SystemNameToComputationIdMapEntry entry :
        response.getSystemNameToComputationIdMapList()) {
      systemNameToComputationIdMap.put(entry.getSystemName(), entry.getComputationId());
    }

    return createComputationConfig(
        // We are only fetching the config for 1 computation, so we should only be getting that
        // computation back.
        Iterables.getOnlyElement(response.getCloudWorksList()),
        transformUserNameToStateFamilyByComputationId(response),
        response.getNameMapList().stream()
            .collect(toImmutableMap(NameMapEntry::getUserName, NameMapEntry::getSystemName)));
  }
@Test
  public void testGetComputationConfig_errorOnNoComputationConfig() {
    StreamingApplianceComputationConfigFetcher configLoader =
        createStreamingApplianceConfigLoader();
    when(mockWindmillServer.getConfig(any()))
        .thenReturn(Windmill.GetConfigResponse.newBuilder().build());
    assertThrows(NoSuchElementException.class, () -> configLoader.fetchConfig("someComputationId"));
  }