@Test public void testRefresh() { final List<ActivityDTO> activities = new ArrayList<ActivityDTO>(); activities.add(new ActivityDTO() { { setId(1L); } }); activities.add(new ActivityDTO() { { setId(2L); } }); CONTEXT.checking(new Expectations() { { oneOf(cache).set(CacheKeys.ACTIVITY_BY_ID + activities.get(0).getId(), activities.get(0)); oneOf(cache).set(CacheKeys.ACTIVITY_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<ActivityDTO> response) { for (ActivityDTO act : response) { getCache().set(CacheKeys.ACTIVITY_BY_ID + act.getId(), act); } }
BulkActivityRefresher extends CachedDomainMapper implements
        RefreshStrategy<Collection<Long>, Collection<ActivityDTO>> { public void refresh(final Collection<Long> request, final Collection<ActivityDTO> response) { for (ActivityDTO act : response) { getCache().set(CacheKeys.ACTIVITY_BY_ID + act.getId(), act); } } }
BulkActivityRefresher extends CachedDomainMapper implements
        RefreshStrategy<Collection<Long>, Collection<ActivityDTO>> { public void refresh(final Collection<Long> request, final Collection<ActivityDTO> response) { for (ActivityDTO act : response) { getCache().set(CacheKeys.ACTIVITY_BY_ID + act.getId(), act); } }  }
BulkActivityRefresher extends CachedDomainMapper implements
        RefreshStrategy<Collection<Long>, Collection<ActivityDTO>> { public void refresh(final Collection<Long> request, final Collection<ActivityDTO> response) { for (ActivityDTO act : response) { getCache().set(CacheKeys.ACTIVITY_BY_ID + act.getId(), act); } }  void refresh(final Collection<Long> request, final Collection<ActivityDTO> response); }
BulkActivityRefresher extends CachedDomainMapper implements
        RefreshStrategy<Collection<Long>, Collection<ActivityDTO>> { public void refresh(final Collection<Long> request, final Collection<ActivityDTO> response) { for (ActivityDTO act : response) { getCache().set(CacheKeys.ACTIVITY_BY_ID + act.getId(), act); } }  void refresh(final Collection<Long> request, final Collection<ActivityDTO> response);  }