* time.
*
* @throws Exception
*/
public void testRemoveChannelsFromGroup() throws Exception {
PersistChanGrpMgr theGrp;
int count = 5;
theGrp = makeEmptyGroup("The Group");
addGenChannels(theGrp, count, 5);
for (int i = 0; i < count; i++) {
ChannelBuilder bld = theGrp.getBuilder();
bld.beginTransaction();
bld.update(theGrp.getChannelGroup());
// Check that we have the right number of Channels
assertValidGroup(theGrp, "The Group", count - i);
// Identify the first channel after ensuring that there is at least one.
Channel channelToDelete;
Collection chans = theGrp.getChannelGroup().getChannels();
Iterator iter = chans.iterator();
assertTrue(chans.size() > 0);
channelToDelete = (Channel) iter.next();
bld.endTransaction();
// And delete it from the group
theGrp.deleteChannel(channelToDelete);
}
}