@Test public void testOnSubtreeModified() throws Exception { ForwardingByTenant forwardingByTenant = new ForwardingByTenantBuilder().setTenantId(TENANT_ID_1).build(); DataObjectModification<ForwardingByTenant> domMock = Mockito.mock(DataObjectModification.class); Mockito.when(domMock.getDataAfter()).thenReturn(forwardingByTenant); InstanceIdentifier<ForwardingByTenant> forwardingByTenantIid = IidFactory.forwardingByTenantIid(TENANT_ID_1); fwdResolver.onSubtreeModified(domMock, forwardingByTenantIid); ReadOnlyTransaction rTx = getDataBroker().newReadOnlyTransaction(); Optional<ForwardingByTenant> potenatialFwdByTenant = rTx.read(LogicalDatastoreType.OPERATIONAL, forwardingByTenantIid).get(); Assert.assertTrue(potenatialFwdByTenant.isPresent()); Assert.assertEquals(forwardingByTenant, potenatialFwdByTenant.get()); }
@Override protected void onSubtreeModified(DataObjectModification<ForwardingByTenant> rootNode, InstanceIdentifier<ForwardingByTenant> rootIdentifier) { ForwardingByTenant forwardingByTenant = rootNode.getDataAfter(); updateForwarding(rootIdentifier, forwardingByTenant); }
ForwardingResolver extends DataTreeChangeHandler<ForwardingByTenant> { @Override protected void onSubtreeModified(DataObjectModification<ForwardingByTenant> rootNode, InstanceIdentifier<ForwardingByTenant> rootIdentifier) { ForwardingByTenant forwardingByTenant = rootNode.getDataAfter(); updateForwarding(rootIdentifier, forwardingByTenant); } }
ForwardingResolver extends DataTreeChangeHandler<ForwardingByTenant> { @Override protected void onSubtreeModified(DataObjectModification<ForwardingByTenant> rootNode, InstanceIdentifier<ForwardingByTenant> rootIdentifier) { ForwardingByTenant forwardingByTenant = rootNode.getDataAfter(); updateForwarding(rootIdentifier, forwardingByTenant); } ForwardingResolver(DataBroker dataProvider); }
ForwardingResolver extends DataTreeChangeHandler<ForwardingByTenant> { @Override protected void onSubtreeModified(DataObjectModification<ForwardingByTenant> rootNode, InstanceIdentifier<ForwardingByTenant> rootIdentifier) { ForwardingByTenant forwardingByTenant = rootNode.getDataAfter(); updateForwarding(rootIdentifier, forwardingByTenant); } ForwardingResolver(DataBroker dataProvider);  }
ForwardingResolver extends DataTreeChangeHandler<ForwardingByTenant> { @Override protected void onSubtreeModified(DataObjectModification<ForwardingByTenant> rootNode, InstanceIdentifier<ForwardingByTenant> rootIdentifier) { ForwardingByTenant forwardingByTenant = rootNode.getDataAfter(); updateForwarding(rootIdentifier, forwardingByTenant); } ForwardingResolver(DataBroker dataProvider);   }