PhyConfigLoader { protected PhysicalPort getPhysicalPort(PhysicalPortId physicalPortId){ return physicalPortHashMap.get(physicalPortId); } PhyConfigLoader(DataBroker dataBroker); Table<PhysicalNodeId, PhysicalPortId, MacAddress> getExternalNetworkMac(); void close(); final static String NODE_PROPERTY; final static String LINK_PROPERTY; final static String EXTERNAL_NETWORK_MAC_PROPERTY; final static String HOST_PROPERTY; }
@Test public void testGetPhysicalPort() throws Exception { PhysicalPortId physicalPortId = mock(PhysicalPortId.class); PhysicalPort physicalPort; Class<PhyConfigLoader> class1 = PhyConfigLoader.class; Method method = class1.getDeclaredMethod("getPhysicalPort",new Class[]{PhysicalPortId.class}); method.setAccessible(true); physicalPort = (PhysicalPort) method.invoke(phyConfigLoader,physicalPortId); Assert.assertTrue(physicalPort == null); }