/** * Sets the up. * * @throws Exception the exception */ @Before public void setUp() throws Exception { MockLogAppender.setupLogging(); initializeRrdStrategy(); initializeDocumentBuilder(); m_collectionAgent = EasyMock.createMock(CollectionAgent.class); EasyMock.expect(m_collectionAgent.getNodeId()).andReturn(1).anyTimes(); EasyMock.expect(m_collectionAgent.getHostAddress()).andReturn("127.0.0.1").anyTimes(); EasyMock.expect(m_collectionAgent.getStorageDir()).andReturn(new File("1")).anyTimes(); m_eventProxy = EasyMock.createMock(EventProxy.class); m_xmlCollectionDao = new XmlDataCollectionConfigDaoJaxb(); Resource resource = new FileSystemResource(getConfigFileName()); m_xmlCollectionDao.setConfigResource(resource); m_xmlCollectionDao.afterPropertiesSet(); EasyMock.replay(m_collectionAgent, m_eventProxy); }