"AVEntertainment-Controller");
Assert.assertNotNull(
"Composite AVEntertainment-02 should contains an instance named AVEntertainment-Controller (start by the composite)",
instCtl);
MediaControlPoint mediaCtl = (MediaControlPoint) instCtl
.getServiceObject();
mediaCtl.resolveServersNumber();
for (Link link : instAV02.getLinks("promotedServers")) {
System.out.println("Promoted Server --> "
+ link.getDestination().getName());
}
for (Link link : instCtl.getLinks("theServers")) {
System.out.println("AVEntertainment-Controller links --> "
+ link.getDestination().getName());
if (!link.isPromotion()) {
Assert.fail("Found a link for whose destination is NOT a promotion");
}
}
Assert.assertEquals(
"Two media renderers should be resolved (internal to composite)",
2, mediaCtl.resolveRenderersNumber());
Assert.assertEquals(
"Only one media server should be resolved (external, using promoted relation only",
1, mediaCtl.resolveServersNumber());
Assert.assertTrue(
"One remote controller should be resolved (external, in root composite)",
mediaCtl.resolveRemoteControl());
//
// for (Instance inst : instAV01.getContainInsts())
// System.out.println("--> " + inst.getName());
}