MBeanServers implements NotificationListener { public String dump() { return ServersInfo.dump(allMBeanServers); } MBeanServers(List<ServerDetector> pDetectors, NotificationListener pListener); synchronized void handleNotification(Notification notification, Object handback); Set<MBeanServerConnection> getMBeanServers(); String dump(); void destroy(); MBeanServerConnection getJolokiaMBeanServer();  }
@Test public void dump() { MBeanServers servers = new MBeanServers(getTestDetectors(),this); String dump = servers.dump(); assertTrue(dump.contains("java.lang")); assertTrue(dump.contains("type=Memory")); }