Code example for ObjectRetrievalFailureException

0
    } 
     
    public void testGetTopLevelResourceNodeDoesNotExist() { 
        expect(m_nodeDao.get(2)).andReturn(null); 
        ThrowableAnticipator ta = new ThrowableAnticipator(); 
        ta.anticipate(new ObjectRetrievalFailureException(OnmsNode.class, "2", "Top-level resource of resource type node could not be found: 2", null)); 
 
        m_easyMockUtils.replayAll(); 
        try { 
            m_resourceDao.getTopLevelResource("node", "2"); 
        } catch (Throwable t) { 
            ta.throwableReceived(t); 
        } 
        m_easyMockUtils.verifyAll(); 
        ta.verifyAnticipated(); 
    } 
     
    public void testGetTopLevelResourceNodeExistsNoChildResources() throws Exception { 
        OnmsNode node = createNode(2, "Node Two"); 
 
Connect your IDE to all the code out there  Get Codota for Java