DataBrokerAdapter { private InstanceIdentifier<PhysicalLink> getPhysicalLinkIdentifier(PhysicalLinkKey physicalLinkKey) { return InstanceIdentifier .builder(PhysicalNetwork.class) .child(PhysicalLinks.class) .child(PhysicalLink.class, physicalLinkKey) .build(); } DataBrokerAdapter(DataBroker dataBroker);   }
@Test public void testGetPhysicalLinkIdentifier() throws Exception { PhysicalLinkKey physicalLinkKey = mock(PhysicalLinkKey.class); Class<DataBrokerAdapter> class1 = DataBrokerAdapter.class; Method method = class1.getDeclaredMethod("getPhysicalLinkIdentifier",new Class[]{PhysicalLinkKey.class}); method.setAccessible(true); Object object = method.invoke(dataBrokerAdapter,physicalLinkKey); Assert.assertTrue(object != null); }