NamedViewCache { @Deprecated public CloseableIterable<NamedViewDetail> getAllNamedViews() throws CacheOperationFailedException { final Set<String> keys = CacheServiceLoader.getService().getAllKeysFromCache(CACHE_NAME); final Set<NamedViewDetail> views = new HashSet<>(); for (final String key : keys) { try { views.add(getFromCache(key)); } catch (final CacheOperationFailedException e) { throw e; } } return new WrappedCloseableIterable<>(views); }  void addNamedView(final NamedViewDetail namedViewDetail, final boolean overwrite); void addNamedView(final NamedViewDetail namedViewDetail, final boolean overwrite, final User user, final String adminAuth); @Deprecated void deleteNamedView(final String name); void deleteNamedView(final String name, final User user); void deleteNamedView(final String name, final User user, final String adminAuth); @Deprecated NamedViewDetail getNamedView(final String name); NamedViewDetail getNamedView(final String name, final User user); NamedViewDetail getNamedView(final String name, final User user, final String adminAuth); @Deprecated CloseableIterable<NamedViewDetail> getAllNamedViews(); CloseableIterable<NamedViewDetail> getAllNamedViews(final User user); CloseableIterable<NamedViewDetail> getAllNamedViews(final User user, final String adminAuth); void clearCache(); void deleteFromCache(final String name); void addToCache(final NamedViewDetail namedView, final boolean overwrite); NamedViewDetail getFromCache(final String name);  }
@Test public void shouldReturnEmptySetIfThereAreNoOperationsInTheCache() throws CacheOperationFailedException { CloseableIterable<NamedViewDetail> views = cache.getAllNamedViews(standardUser); assertEquals(0, Iterables.size(views)); }