conf.getBroadcastGroupConfigurations().add(broadcastGroupConfig);
conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
service = HornetQServers.newHornetQServer(conf, mbeanServer, false);
service.start();
BroadcastGroupControl broadcastGroupControl = createManagementControl(broadcastGroupConfig.getName());
Assert.assertEquals(broadcastGroupConfig.getName(), broadcastGroupControl.getName());
Assert.assertEquals(broadcastGroupConfig.getGroupAddress(), broadcastGroupControl.getGroupAddress());
Assert.assertEquals(broadcastGroupConfig.getGroupPort(), broadcastGroupControl.getGroupPort());
Assert.assertEquals(broadcastGroupConfig.getLocalBindPort(), broadcastGroupControl.getLocalBindPort());
Assert.assertEquals(broadcastGroupConfig.getBroadcastPeriod(), broadcastGroupControl.getBroadcastPeriod());
Object[] connectorPairs = broadcastGroupControl.getConnectorPairs();
Assert.assertEquals(1, connectorPairs.length);
System.out.println(connectorPairs);
String connectorPairData = (String)connectorPairs[0];
Assert.assertEquals(broadcastGroupConfig.getConnectorInfos().get(0), connectorPairData);
String jsonString = broadcastGroupControl.getConnectorPairsAsJSON();
Assert.assertNotNull(jsonString);
JSONArray array = new JSONArray(jsonString);
Assert.assertEquals(1, array.length());
Assert.assertEquals(broadcastGroupConfig.getConnectorInfos().get(0), array.getString(0));
Assert.assertTrue(broadcastGroupControl.isStarted());
}