@Test public void testExecute() { Set<String> params = new HashSet<String>(2); params.add("foo"); params.add("bar"); sut = new DeleteCacheKeys(); sut.setCache(cache); context.checking(new Expectations() { { oneOf(cache).delete("foo"); oneOf(cache).delete("bar"); } }); sut.execute(params); context.assertIsSatisfied(); }
@Override public Boolean execute(final Set<String> inRequest) { Cache cache = getCache(); Iterator<String> it = inRequest.iterator(); while (it.hasNext()) { cache.delete(it.next()); } return Boolean.TRUE; }
DeleteCacheKeys extends BaseArgCachedDomainMapper<Set<String>, Boolean> { @Override public Boolean execute(final Set<String> inRequest) { Cache cache = getCache(); Iterator<String> it = inRequest.iterator(); while (it.hasNext()) { cache.delete(it.next()); } return Boolean.TRUE; } }
DeleteCacheKeys extends BaseArgCachedDomainMapper<Set<String>, Boolean> { @Override public Boolean execute(final Set<String> inRequest) { Cache cache = getCache(); Iterator<String> it = inRequest.iterator(); while (it.hasNext()) { cache.delete(it.next()); } return Boolean.TRUE; }  }
DeleteCacheKeys extends BaseArgCachedDomainMapper<Set<String>, Boolean> { @Override public Boolean execute(final Set<String> inRequest) { Cache cache = getCache(); Iterator<String> it = inRequest.iterator(); while (it.hasNext()) { cache.delete(it.next()); } return Boolean.TRUE; }  @Override Boolean execute(final Set<String> inRequest); }
DeleteCacheKeys extends BaseArgCachedDomainMapper<Set<String>, Boolean> { @Override public Boolean execute(final Set<String> inRequest) { Cache cache = getCache(); Iterator<String> it = inRequest.iterator(); while (it.hasNext()) { cache.delete(it.next()); } return Boolean.TRUE; }  @Override Boolean execute(final Set<String> inRequest);  }