@Test public void testHandleChange() throws Exception { filterListener.handleChange(Collections.singletonList(getObjectModification( getObjectModification(DataObjectModification.ModificationType.WRITE, getDomainFilter(5, 2), getDomainFilter(5, 3)))), LogicalDatastoreType.OPERATIONAL, getIdentifier()); verify(writeTransaction, never()) .put(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class), any(DataObject.class)); verify(writeTransaction, never()) .merge(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class), any(DataObject.class)); verify(writeTransaction, never()).delete(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class)); filterListener.handleChange(Collections.singletonList(getObjectModification( getObjectModification(DataObjectModification.ModificationType.WRITE, null, getDomainFilter(5, 2)))), LogicalDatastoreType.CONFIGURATION, getIdentifier()); verify(writeTransaction).put(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class), any(DataObject.class)); filterListener.handleChange(Collections.singletonList(getObjectModification( getObjectModification(DataObjectModification.ModificationType.WRITE, getDomainFilter(5, 2), getDomainFilter(5, 4)))), LogicalDatastoreType.CONFIGURATION, getIdentifier()); verify(writeTransaction) .merge(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class), any(DataObject.class)); filterListener.handleChange(Collections.singletonList(getObjectModification( getObjectModification(DataObjectModification.ModificationType.DELETE, getDomainFilter(5, 2), getDomainFilter(5, 4)))), LogicalDatastoreType.CONFIGURATION, getIdentifier()); verify(writeTransaction).delete(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class)); }
@Override protected InstanceIdentifier<DomainFilter> getIdentifier(DomainFilter d, InstanceIdentifier<SxpDomain> parentIdentifier) { return parentIdentifier.child(DomainFilters.class) .child(DomainFilter.class, new DomainFilterKey(d.getFilterName(), d.getFilterSpecific())); }
DomainFilterListener extends ListListener<SxpDomain, DomainFilters, DomainFilter> { @Override protected InstanceIdentifier<DomainFilter> getIdentifier(DomainFilter d, InstanceIdentifier<SxpDomain> parentIdentifier) { return parentIdentifier.child(DomainFilters.class) .child(DomainFilter.class, new DomainFilterKey(d.getFilterName(), d.getFilterSpecific())); } }
DomainFilterListener extends ListListener<SxpDomain, DomainFilters, DomainFilter> { @Override protected InstanceIdentifier<DomainFilter> getIdentifier(DomainFilter d, InstanceIdentifier<SxpDomain> parentIdentifier) { return parentIdentifier.child(DomainFilters.class) .child(DomainFilter.class, new DomainFilterKey(d.getFilterName(), d.getFilterSpecific())); } DomainFilterListener(DatastoreAccess datastoreAccess); }
DomainFilterListener extends ListListener<SxpDomain, DomainFilters, DomainFilter> { @Override protected InstanceIdentifier<DomainFilter> getIdentifier(DomainFilter d, InstanceIdentifier<SxpDomain> parentIdentifier) { return parentIdentifier.child(DomainFilters.class) .child(DomainFilter.class, new DomainFilterKey(d.getFilterName(), d.getFilterSpecific())); } DomainFilterListener(DatastoreAccess datastoreAccess);  }
DomainFilterListener extends ListListener<SxpDomain, DomainFilters, DomainFilter> { @Override protected InstanceIdentifier<DomainFilter> getIdentifier(DomainFilter d, InstanceIdentifier<SxpDomain> parentIdentifier) { return parentIdentifier.child(DomainFilters.class) .child(DomainFilter.class, new DomainFilterKey(d.getFilterName(), d.getFilterSpecific())); } DomainFilterListener(DatastoreAccess datastoreAccess);   }