public ForComputation forComputation(String computation) {
    return new ForComputation(computation);
  }
@Test
  public void testMultipleKeys() throws Exception {
    TestStateTag tag = new TestStateTag("tag1");

    WindmillStateCache.ForKeyAndFamily keyCache1 =
        cache
            .forComputation("comp1")
            .forKey(computationKey("comp1", "key1", SHARDING_KEY), 0L, 0L)
            .forFamily(STATE_FAMILY);
    WindmillStateCache.ForKeyAndFamily keyCache2 =
        cache
            .forComputation("comp1")
            .forKey(computationKey("comp1", "key2", SHARDING_KEY), 0L, 10L)
            .forFamily(STATE_FAMILY);
    WindmillStateCache.ForKeyAndFamily keyCache3 =
        cache
            .forComputation("comp2")
            .forKey(computationKey("comp2", "key1", SHARDING_KEY), 0L, 0L)
            .forFamily(STATE_FAMILY);

    TestState state1 = new TestState("g1");
    keyCache1.put(StateNamespaces.global(), tag, state1, 2);
    assertEquals(Optional.of(state1), keyCache1.get(StateNamespaces.global(), tag));
    keyCache1.persist();

    keyCache1 =
        cache
            .forComputation("comp1")
            .forKey(computationKey("comp1", "key1", SHARDING_KEY), 0L, 1L)
            .forFamily(STATE_FAMILY);
    assertEquals(Optional.of(state1), keyCache1.get(StateNamespaces.global(), tag));
    assertEquals(Optional.empty(), keyCache2.get(StateNamespaces.global(), tag));
    assertEquals(Optional.empty(), keyCache3.get(StateNamespaces.global(), tag));

    TestState state2 = new TestState("g2");
    keyCache2.put(StateNamespaces.global(), tag, state2, 2);
    keyCache2.persist();
    assertEquals(Optional.of(state2), keyCache2.get(StateNamespaces.global(), tag));
    keyCache2 =
        cache
            .forComputation("comp1")
            .forKey(computationKey("comp1", "key2", SHARDING_KEY), 0L, 20L)
            .forFamily(STATE_FAMILY);
    assertEquals(Optional.of(state2), keyCache2.get(StateNamespaces.global(), tag));
    assertEquals(Optional.of(state1), keyCache1.get(StateNamespaces.global(), tag));
    assertEquals(Optional.empty(), keyCache3.get(StateNamespaces.global(), tag));
  }