### Question:
SxpCapableNodeListener implements DataTreeChangeListener<SxpConnection> { void close() { listenerRegistration.close(); } SxpCapableNodeListener(DataBroker dataBroker, String sxpNodeId); @Override synchronized void onDataTreeChanged(Collection<DataTreeModification<SxpConnection>> changes);  }### Answer:
@Test public void testClose() { dataBroker = mock(DataBroker.class); ListenerRegistration<SxpCapableNodeListener> registration = mock(ListenerRegistration.class); when(dataBroker.registerDataTreeChangeListener(any(), isA(SxpCapableNodeListener.class))) .thenReturn(registration); nodeListener = new SxpCapableNodeListener(dataBroker, SXP_NODE_ID); nodeListener.close(); verify(registration).close(); }