コード例 #1
0
  @Test
  public void keyShouldBeComposedFromUserAndDepth() {
    Map<String, Set<String>> graph = Collections.singletonMap("a", Collections.singleton("b"));

    cache.putGraph("a", 2, graph);

    assertTrue(cache.getGraph("a", 5).isEmpty());
  }
コード例 #2
0
  @Test
  public void putAndGet() {
    Map<String, Set<String>> graph = Collections.singletonMap("a", Collections.singleton("b"));

    cache.putGraph("a", 1, graph);
    Map<String, Set<String>> actual = cache.getGraph("a", 1);

    assertEquals(graph, actual);
  }