public ImmutableList<ComputationState> getAllPresentComputations() {
    return computationCache.asMap().values().stream().collect(toImmutableList());
  }
@Test
  public void testGetAllPresentComputations() {
    String computationId1 = "computationId1";
    String computationId2 = "computationId2";
    MapTask mapTask = new MapTask().setStageName("stageName").setSystemName("systemName");
    Map<String, String> userTransformToStateFamilyName =
        ImmutableMap.of("userTransformName", "stateFamilyName");
    ComputationConfig computationConfig =
        ComputationConfig.create(mapTask, userTransformToStateFamilyName, ImmutableMap.of());
    when(configFetcher.fetchConfig(eq(computationId1))).thenReturn(Optional.of(computationConfig));
    when(configFetcher.fetchConfig(eq(computationId2))).thenReturn(Optional.of(computationConfig));

    computationStateCache.get(computationId1);
    computationStateCache.get(computationId2);
    Set<String> expectedComputationIds = ImmutableSet.of(computationId1, computationId2);
    Set<String> actualComputationIds =
        computationStateCache.getAllPresentComputations().stream()
            .map(ComputationState::getComputationId)
            .collect(Collectors.toSet());
    assertThat(actualComputationIds).containsExactlyElementsIn(expectedComputationIds);
    computationStateCache
        .getAllPresentComputations()
        .forEach(
            computationState -> {
              assertThat(expectedComputationIds).contains(computationState.getComputationId());
              assertThat(computationState.getMapTask()).isEqualTo(mapTask);
              assertThat(computationState.getTransformUserNameToStateFamily())
                  .isEqualTo(userTransformToStateFamilyName);
            });
  }