use of org.opennms.netmgt.config.wsman.Rrd in project opennms by OpenNMS.
the class WSManCollectorComplianceTest method getRequiredBeans.
public Map<String, Object> getRequiredBeans() {
OnmsNode node = mock(OnmsNode.class, RETURNS_DEEP_STUBS);
NodeDao nodeDao = mock(NodeDao.class);
when(nodeDao.get(anyInt())).thenReturn(node);
Definition agentConfig = new Definition();
WSManConfigDao wsManConfigDao = mock(WSManConfigDao.class);
when(wsManConfigDao.getAgentConfig(InetAddrUtils.getLocalHostAddress())).thenReturn(agentConfig);
WsmanDatacollectionConfig config = new WsmanDatacollectionConfig();
config.setRrdRepository("target");
Collection collection = new Collection();
collection.setRrd(new Rrd());
WSManDataCollectionConfigDao wsManDataCollectionConfigDao = mock(WSManDataCollectionConfigDao.class);
when(wsManDataCollectionConfigDao.getCollectionByName(COLLECTION)).thenReturn(collection);
when(wsManDataCollectionConfigDao.getConfig()).thenReturn(config);
return new ImmutableMap.Builder<String, Object>().put("nodeDao", nodeDao).put("wsManConfigDao", wsManConfigDao).put("wsManDataCollectionConfigDao", wsManDataCollectionConfigDao).build();
}
Aggregations