@Test @SuppressWarnings({"unchecked", "ConstantConditions"}) public void testSaveSuccess() { long refreshPeriod = 60; CombinedFeed feed = new CombinedFeed.CombinedFeedBuilder("1", "http: .refreshPeriod(refreshPeriod).build(); expect(scheduler.scheduleAtFixedRate( anyObject(Runnable.class), eq(0L), eq(60L), eq(TimeUnit.SECONDS))).andReturn(scheduledFuture); expect(taskFactory.get(feed)).andReturn(new FeedDownloadTask(null, null, null)); replayAll(); testedClass.save(feed); verifyAll(); }
@Override public void save(Serializable entity) { createTask(entity); }
FeedDataStoreManager implements DataStoreObserver { @Override public void save(Serializable entity) { createTask(entity); } }
FeedDataStoreManager implements DataStoreObserver { @Override public void save(Serializable entity) { createTask(entity); } FeedDataStoreManager(FeedTaskFactory taskFactory);  FeedDataStoreManager(FeedTaskFactory taskFactory, ScheduledExecutorService scheduler); }
FeedDataStoreManager implements DataStoreObserver { @Override public void save(Serializable entity) { createTask(entity); } FeedDataStoreManager(FeedTaskFactory taskFactory);  FeedDataStoreManager(FeedTaskFactory taskFactory, ScheduledExecutorService scheduler); @Override void save(Serializable entity); @Override void saveAll(Collection<Serializable> entities); @Override void remove(String key); @Override void removeAll(Collection<String> keys); }
FeedDataStoreManager implements DataStoreObserver { @Override public void save(Serializable entity) { createTask(entity); } FeedDataStoreManager(FeedTaskFactory taskFactory);  FeedDataStoreManager(FeedTaskFactory taskFactory, ScheduledExecutorService scheduler); @Override void save(Serializable entity); @Override void saveAll(Collection<Serializable> entities); @Override void remove(String key); @Override void removeAll(Collection<String> keys);  }