use of org.opennms.netmgt.dao.jmx.JmxConfigDao in project opennms by OpenNMS.
the class JMXCollectorComplianceTest method getRequiredBeans.
@Override
public Map<String, Object> getRequiredBeans() {
MBeanServer mbeanServer = new MBeanServer();
JmxConfigDao jmxConfigDao = mock(JmxConfigDao.class, RETURNS_DEEP_STUBS);
final String host = InetAddrUtils.str(InetAddrUtils.getLocalHostAddress());
when(jmxConfigDao.getConfig().lookupMBeanServer(host, JmxServerConnector.DEFAULT_OPENNMS_JMX_PORT)).thenReturn(mbeanServer);
JmxCollection collection = new JmxCollection();
JMXDataCollectionConfigDao jmxCollectionDao = mock(JMXDataCollectionConfigDao.class, RETURNS_DEEP_STUBS);
when(jmxCollectionDao.getJmxCollection(COLLECTION)).thenReturn(collection);
return new ImmutableMap.Builder<String, Object>().put("jmxConfigDao", jmxConfigDao).put("jmxDataCollectionConfigDao", jmxCollectionDao).build();
}
Aggregations