@Test
public void testGetResources() 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>();
  List<String> feedNames = new LinkedList<String>();
  feedNames.add("Feed1");
  feedNames.add("Feed2");
  feedNames.add("Feed3");
  Map<String,String> props = new HashMap<String, String>();
  Feed feed1 = new Feed("Feed1", "d", "s", "sch", "source", "st", "end", "l", "a", "target", "st", "end", "l", "a", props);
  Feed feed2 = new Feed("Feed2", "d", "s", "sch", "source", "st", "end", "l", "a", "target", "st", "end", "l", "a", props);
  Feed feed3 = new Feed("Feed3", "d", "s", "sch", "source", "st", "end", "l", "a", "target", "st", "end", "l", "a", props);
  // set expectations
  expect(service.getFeedNames()).andReturn(feedNames);
  expect(service.getFeed("Feed1")).andReturn(feed1);
  expect(service.getFeed("Feed2")).andReturn(feed2);
  expect(service.getFeed("Feed3")).andReturn(feed3);
  // 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));
  Set<Resource> resources = provider.getResources(request, null);
  Assert.assertEquals(3, resources.size());
  // verify
  verify(service);
}