Code example for ObjectRetrievalFailureException

0
        assertNotNull("Resource should not be null", resource); 
    } 
     
    public void testGetTopLevelResourceDomainDoesNotExistInCollectdConfig() { 
        ThrowableAnticipator ta = new ThrowableAnticipator(); 
        ta.anticipate(new ObjectRetrievalFailureException(OnmsResource.class, "bogus", "Domain not found due to domain RRD directory not existing or not a directory: " + m_fileAnticipator.getTempDir() + File.separator + "snmp" + File.separator + "bogus", null)); 
         
        m_easyMockUtils.replayAll(); 
        try { 
            m_resourceDao.getTopLevelResource("domain", "bogus"); 
        } catch (Throwable t) { 
            ta.throwableReceived(t); 
        } 
        m_easyMockUtils.verifyAll(); 
        ta.verifyAnticipated(); 
    } 
 
    // We don't need to test everything that could cause the filter to fail... that's the job of a filter test case 
    public void testGetTopLevelResourceDomainDoesNotExistNoInterfaceDirectories() throws IOException { 
        File snmp = m_fileAnticipator.tempDir("snmp");