### Question:
ClassifierDefinitionListener extends DataTreeChangeHandler<ClassifierDefinition> { @Override protected void onSubtreeModified(DataObjectModification<ClassifierDefinition> rootNode, InstanceIdentifier<ClassifierDefinition> rootIdentifier) { ClassifierDefinition classifierDefinitionAfter = checkNotNull(rootNode.getDataAfter()); Classifier ourClassifier = SubjectFeatures.getClassifier(classifierDefinitionAfter.getId()); if (ourClassifier != null) { SupportedClassifierDefinition supportedClassifierDefinition = createSupportedClassifierDefinition(ourClassifier); WriteTransaction wTx = dataProvider.newWriteOnlyTransaction(); wTx.put(LogicalDatastoreType.OPERATIONAL, CAPABILITIES_IID.child(SupportedClassifierDefinition.class, supportedClassifierDefinition.getKey()), supportedClassifierDefinition, true); Futures.addCallback(wTx.submit(), logDebugResult(supportedClassifierDefinition.getKey(), PUT), MoreExecutors.directExecutor()); } } ClassifierDefinitionListener(DataBroker dataBroker);   }### Answer:
@Test public void testOnSubtreeModified() { when(rootNode.getModificationType()).thenReturn(DataObjectModification.ModificationType.SUBTREE_MODIFIED); WriteTransaction wt = resetTransaction(); listener.onDataTreeChanged(changes); verify(listener).onSubtreeModified(rootNode, rootIdentifier); }