### Question:
ActionDefinitionListener extends DataTreeChangeHandler<ActionDefinition> { @Override protected void onWrite(DataObjectModification<ActionDefinition> rootNode, InstanceIdentifier<ActionDefinition> rootIdentifier) { onSubtreeModified(rootNode, rootIdentifier); } ActionDefinitionListener(DataBroker dataBroker);   }### Answer:
@Test public void testOnWrite() { when(rootNode.getModificationType()).thenReturn(DataObjectModification.ModificationType.WRITE); WriteTransaction wt = resetTransaction(); listener.onDataTreeChanged(changes); verify(listener).onSubtreeModified(rootNode, rootIdentifier); }