### Question:
ResolvedPolicyListener extends DataTreeChangeHandler<ResolvedPolicy> { @Override protected void onWrite(DataObjectModification<ResolvedPolicy> rootNode, InstanceIdentifier<ResolvedPolicy> rootIdentifier) { processResolvedPolicyNotification(rootNode.getDataAfter()); LOG.trace("Called processResolvedPolicyNotification with ResolvedPolicyKey {} ", rootNode.getDataAfter().getKey()); } ResolvedPolicyListener(DataBroker dataBroker, IovisorModuleManager iovisorModuleManager);   }### Answer:
@Test public void testOnWrite() { when(rootNode.getModificationType()).thenReturn(DataObjectModification.ModificationType.WRITE); resolvedPolicyListener.onDataTreeChanged(changes); verify(resolvedPolicyListener).processResolvedPolicyNotification(eq(resolvedPolicy)); }