@Test
public void testUpdateResources() throws Exception {

  IvoryService service = createMock(IvoryService.class);
  Set<Map<String, Object>> propertySet = new HashSet<Map<String, Object>>();
  Map<String, Object> properties = new HashMap<String, Object>();
  properties.put(FeedResourceProvider.FEED_NAME_PROPERTY_ID, "Feed1");
  properties.put(FeedResourceProvider.FEED_DESCRIPTION_PROPERTY_ID, "desc");
  properties.put(FeedResourceProvider.FEED_SCHEDULE_PROPERTY_ID, "sched");
  properties.put(FeedResourceProvider.FEED_STATUS_PROPERTY_ID, "WAITING");
  properties.put(FeedResourceProvider.FEED_SOURCE_CLUSTER_NAME_PROPERTY_ID, "source");
  properties.put(FeedResourceProvider.FEED_TARGET_CLUSTER_NAME_PROPERTY_ID, "target");
  List<String> feedNames = new LinkedList<String>();
  feedNames.add("Feed1");
  Map<String,String> props = new HashMap<String, String>();
  Feed feed1 = new Feed("Feed1", "desc", "WAITING", "sched", "source", "st", "end", "l", "a", "target", "st", "end", "l", "a", props);
  // set expectations
  expect(service.getFeedNames()).andReturn(feedNames);
  expect(service.getFeed("Feed1")).andReturn(feed1);
  service.updateFeed(feed1);
  // replay
  replay(service);
  propertySet.add(properties);
  Request request = PropertyHelper.getCreateRequest(propertySet, Collections.<String,String>emptyMap());
  FeedResourceProvider provider = new FeedResourceProvider(service,
      PropertyHelper.getPropertyIds(Resource.Type.DRFeed),
      PropertyHelper.getKeyPropertyIds(Resource.Type.DRFeed));
  provider.updateResources(request, null);
  // verify
  verify(service);
}