示例#1
0
  public void testClear() {
    ObjectStorage storage = mock(ObjectStorage.class);

    ByteCache cache =
        (ByteCache)
            Wrapping.getFactory(
                    new Signature(null, Object.class), new Signature(null, byte.class), false)
                .wrap("123", CALCULATABLE, storage, new MutableStatisticsImpl());
    cache.setDependencyNode(DependencyTracker.DUMMY_NODE);

    cache.clear();

    verify(storage).clear();
    verifyNoMoreInteractions(storage);
  }