@Test public void testRefresh() { final List<ActivitySecurityDTO> activities = new ArrayList<ActivitySecurityDTO>(); activities.add(new ActivitySecurityDTO(1L, 2L, false)); activities.add(new ActivitySecurityDTO(2L, 3L, false)); CONTEXT.checking(new Expectations() { { oneOf(cache).set(CacheKeys.ACTIVITY_SECURITY_BY_ID + activities.get(0).getId(), activities.get(0)); oneOf(cache).set(CacheKeys.ACTIVITY_SECURITY_BY_ID + activities.get(1).getId(), activities.get(1)); } }); sut.refresh(Arrays.asList(1L, 2L), activities); CONTEXT.assertIsSatisfied(); }
public void refresh(final Collection<Long> request, final Collection<ActivitySecurityDTO> response) { for (ActivitySecurityDTO actSec : response) { getCache().set(CacheKeys.ACTIVITY_SECURITY_BY_ID + actSec.getId(), actSec); } }
BulkActivitySecurityRefresher extends CachedDomainMapper implements
        RefreshStrategy<Collection<Long>, Collection<ActivitySecurityDTO>> { public void refresh(final Collection<Long> request, final Collection<ActivitySecurityDTO> response) { for (ActivitySecurityDTO actSec : response) { getCache().set(CacheKeys.ACTIVITY_SECURITY_BY_ID + actSec.getId(), actSec); } } }
BulkActivitySecurityRefresher extends CachedDomainMapper implements
        RefreshStrategy<Collection<Long>, Collection<ActivitySecurityDTO>> { public void refresh(final Collection<Long> request, final Collection<ActivitySecurityDTO> response) { for (ActivitySecurityDTO actSec : response) { getCache().set(CacheKeys.ACTIVITY_SECURITY_BY_ID + actSec.getId(), actSec); } }  }
BulkActivitySecurityRefresher extends CachedDomainMapper implements
        RefreshStrategy<Collection<Long>, Collection<ActivitySecurityDTO>> { public void refresh(final Collection<Long> request, final Collection<ActivitySecurityDTO> response) { for (ActivitySecurityDTO actSec : response) { getCache().set(CacheKeys.ACTIVITY_SECURITY_BY_ID + actSec.getId(), actSec); } }  void refresh(final Collection<Long> request, final Collection<ActivitySecurityDTO> response); }
BulkActivitySecurityRefresher extends CachedDomainMapper implements
        RefreshStrategy<Collection<Long>, Collection<ActivitySecurityDTO>> { public void refresh(final Collection<Long> request, final Collection<ActivitySecurityDTO> response) { for (ActivitySecurityDTO actSec : response) { getCache().set(CacheKeys.ACTIVITY_SECURITY_BY_ID + actSec.getId(), actSec); } }  void refresh(final Collection<Long> request, final Collection<ActivitySecurityDTO> response);  }