feed1.setName("f1");
feed1.setGroups("group1,group2,group3");
Location location = new Location();
location.setPath("/projects/bi/rmc/daily/ad/${YEAR}/fraud/${MONTH}-${DAY}/ad");
location.setType(LocationType.DATA);
feed1.setLocations(new Locations());
feed1.getLocations().getLocations().add(location);
getStore().publish(EntityType.FEED, feed1);
Map<String, FeedGroup> groupMapping = FeedGroupMap.get()
.getGroupsMapping();
FeedGroup group = groupMapping.get("group1");
Assert.assertEquals(group.getName(), "group1");
Assert.assertEquals(group.getFeeds().size(), 1);
assertFields(group, feed1);
group = groupMapping.get("group2");
Assert.assertEquals(group.getName(), "group2");
Assert.assertEquals(group.getFeeds().size(), 1);
assertFields(group, feed1);
group = groupMapping.get("group3");
Assert.assertEquals(group.getName(), "group3");
Assert.assertEquals(group.getFeeds().size(), 1);
assertFields(group, feed1);
Feed feed2 = (Feed) EntityType.FEED.getUnmarshaller().unmarshal(
FeedGroupMapTest.class
.getResourceAsStream("/config/feed/feed-0.1.xml"));
feed2.setName("f2");
feed2.setGroups("group1,group5,group3");
location.setPath("/projects/bi/rmc/daily/ad/${YEAR}/${MONTH}/${DAY}/ad2");
location.setType(LocationType.DATA);
feed2.setLocations(new Locations());
feed2.getLocations().getLocations().add(location);
getStore().publish(EntityType.FEED, feed2);
groupMapping = FeedGroupMap.get().getGroupsMapping();
group = groupMapping.get("group1");