public Optional<ComputationState> get(String computationId) {
    try {
      return Optional.ofNullable(computationCache.get(computationId));
    } catch (UncheckedExecutionException
        | ExecutionException
        | ComputationStateNotFoundException e) {
      if (e.getCause() instanceof ComputationStateNotFoundException
          || e instanceof ComputationStateNotFoundException) {
        LOG.error(
            "Trying to fetch unknown computation={}, known computations are {}.",
            computationId,
            ImmutableSet.copyOf(computationCache.asMap().keySet()));
      } else {
        LOG.warn("Error occurred fetching computation for computationId={}", computationId, e);
      }
    }

    return Optional.empty();
  }
@Test
  public void testGet_computationStateConfigFetcherFailure() {
    String computationId = "computationId";
    when(configFetcher.fetchConfig(eq(computationId))).thenThrow(new RuntimeException());
    Optional<ComputationState> computationState = computationStateCache.get(computationId);
    assertFalse(computationState.isPresent());
    // Fetch again to make sure we call configFetcher and nulls/empty are not cached.
    Optional<ComputationState> computationState2 = computationStateCache.get(computationId);
    assertFalse(computationState2.isPresent());
    verify(configFetcher, times(2)).fetchConfig(eq(computationId));
  }