PhysicalResourceLoader { protected PhysicalLink getPhysicalLink(PhysicalLinkId physicalLinkId){ return physicalLinkHashMap.get(physicalLinkId); } PhysicalResourceLoader(DataBroker dataBroker); void close(); final static String NODE_PROPERTY; final static String LINK_PROPERTY; final static String EXTERNAL_NETWORK_PROPERTY; final static String HOST_PROPERTY; }
@Test public void testGetPhysicalLink() throws Exception { PhysicalLinkId physicalLinkId = mock(PhysicalLinkId.class); PhysicalLink physicalLink; Class<PhysicalResourceLoader> class1 = PhysicalResourceLoader.class; Method method = class1.getDeclaredMethod("getPhysicalLink",new Class[]{PhysicalLinkId.class}); method.setAccessible(true); physicalLink = (PhysicalLink) method.invoke(physicalResourceLoader,physicalLinkId); Assert.assertTrue(physicalLink == null); }