detector.setConfiguration(xml.getDocumentElement());
server.registerMBean(detector, new ObjectName("test:type=MulticastDetector"));
detector.start();
// Verify that TestNetworkRegistry proxy gets used.
detector.forceDetection();
assertEquals(1, networkRegistry.counter);
int counter = ((Integer) server.getAttribute(name, "Counter")).intValue();
assertEquals(networkRegistry.counter, counter);
detector.stop();