package org.opennms.netmgt.dao.support;

import java.io.IOException;

import org.opennms.netmgt.dao.ResourceDao;
import org.opennms.netmgt.dao.support.DefaultResourceDao;
import org.opennms.netmgt.dao.support.ResponseTimeResourceType;

import junit.framework.TestCase;

public class ResponseTimeResourceTypeTest extends TestCase {
    public void testGetResourcesUsingDao() throws IOException {
        ResourceDao resourceDao = new DefaultResourceDao();
        
        ResponseTimeResourceType r = new ResponseTimeResourceType(resourceDao, null);
        
        r.getResourcesForNode(1);
    }
}

@@ -45,29 +45,248 @@
 ort 
-java.io.IOException;%0A
+static org.easymock.EasyMock.createMock;%0Aimport static org.easymock.EasyMock.expect;%0Aimport static org.easymock.EasyMock.replay;%0Aimport static org.easymock.EasyMock.verify;%0Aimport java.io.IOException;%0A%0Aimport org.opennms.netmgt.dao.NodeDao;
 %0Aimp
@@ -446,16 +446,58 @@
 rceType;
+%0Aimport org.opennms.netmgt.model.OnmsNode;
 %0A%0Aimport
@@ -709,16 +709,136 @@
 eDao();%0A
+        NodeDao nodeDao = createMock(NodeDao.class);%0A        %0A        expect(nodeDao.get(1)).andReturn(new OnmsNode());%0A
         
@@ -922,11 +922,14 @@
 o, n
-ull
+odeDao
 );%0A 
@@ -949,30 +949,80 @@
    r
-.getResourcesForNode(1
+eplay(nodeDao);%0A        r.getResourcesForNode(1);%0A        verify(nodeDao
 );%0A 

Fix failing test by mocking up NodeDao