NamedOperationCache { public CloseableIterable<NamedOperationDetail> getAllNamedOperations(final User user) { return getAll(user, null); }  void addNamedOperation(final NamedOperationDetail namedOperation, final boolean overwrite, final User user); void addNamedOperation(final NamedOperationDetail namedOperation, final boolean overwrite, final User user, final String adminAuth); void deleteNamedOperation(final String name, final User user); void deleteNamedOperation(final String name, final User user, final String adminAuth); NamedOperationDetail getNamedOperation(final String name, final User user); NamedOperationDetail getNamedOperation(final String name, final User user, final String adminAuth); CloseableIterable<NamedOperationDetail> getAllNamedOperations(final User user); CloseableIterable<NamedOperationDetail> getAllNamedOperations(final User user, final String adminAuth); void clear(); void deleteFromCache(final String name); void addToCache(final String name, final NamedOperationDetail operation, final boolean overwrite); NamedOperationDetail getFromCache(final String name);  }
@Test public void shouldReturnEmptySetIfThereAreNoOperationsInTheCache() { CloseableIterable<NamedOperationDetail> ops = cache.getAllNamedOperations(standardUser); assert Iterables.size(ops) == 0; }