NamedViewCache { @Deprecated public void deleteNamedView(final String name) throws CacheOperationFailedException { deleteNamedView(name, null); }  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 shouldThrowExceptionWhenDeletingIfKeyIsNull() throws CacheOperationFailedException { try { cache.deleteNamedView(null, standardUser); fail(EXCEPTION_EXPECTED); } catch (IllegalArgumentException e) { assertTrue(e.getMessage().contains("NamedView name cannot be null")); } }