@Test public void testOnDelete() { when(rootNode.getModificationType()).thenReturn(DataObjectModification.ModificationType.DELETE); listener.onDataTreeChanged(changes); verify(listener).onDelete(rootNode, rootIdentifier); }
@Override protected void onDelete(DataObjectModification<SflowClientSettings> rootNode, InstanceIdentifier<SflowClientSettings> rootIdentifier) { try { classifierListener.close(); ofStatisticsManager.close(); } catch (Exception e) { LOG.error( "Error during closing OFStatisticsManager and ResolvedPolicyClassifierListener. " + "Statistics do not have to be correct because of illegal state.", e); } }
SflowClientSettingsListener extends DataTreeChangeHandler<SflowClientSettings> { @Override protected void onDelete(DataObjectModification<SflowClientSettings> rootNode, InstanceIdentifier<SflowClientSettings> rootIdentifier) { try { classifierListener.close(); ofStatisticsManager.close(); } catch (Exception e) { LOG.error( "Error during closing OFStatisticsManager and ResolvedPolicyClassifierListener. " + "Statistics do not have to be correct because of illegal state.", e); } } }
SflowClientSettingsListener extends DataTreeChangeHandler<SflowClientSettings> { @Override protected void onDelete(DataObjectModification<SflowClientSettings> rootNode, InstanceIdentifier<SflowClientSettings> rootIdentifier) { try { classifierListener.close(); ofStatisticsManager.close(); } catch (Exception e) { LOG.error( "Error during closing OFStatisticsManager and ResolvedPolicyClassifierListener. " + "Statistics do not have to be correct because of illegal state.", e); } } SflowClientSettingsListener(DataBroker dataprovider, ScheduledExecutorService executor, StatisticsManager statisticsManager); }
SflowClientSettingsListener extends DataTreeChangeHandler<SflowClientSettings> { @Override protected void onDelete(DataObjectModification<SflowClientSettings> rootNode, InstanceIdentifier<SflowClientSettings> rootIdentifier) { try { classifierListener.close(); ofStatisticsManager.close(); } catch (Exception e) { LOG.error( "Error during closing OFStatisticsManager and ResolvedPolicyClassifierListener. " + "Statistics do not have to be correct because of illegal state.", e); } } SflowClientSettingsListener(DataBroker dataprovider, ScheduledExecutorService executor, StatisticsManager statisticsManager);  }
SflowClientSettingsListener extends DataTreeChangeHandler<SflowClientSettings> { @Override protected void onDelete(DataObjectModification<SflowClientSettings> rootNode, InstanceIdentifier<SflowClientSettings> rootIdentifier) { try { classifierListener.close(); ofStatisticsManager.close(); } catch (Exception e) { LOG.error( "Error during closing OFStatisticsManager and ResolvedPolicyClassifierListener. " + "Statistics do not have to be correct because of illegal state.", e); } } SflowClientSettingsListener(DataBroker dataprovider, ScheduledExecutorService executor, StatisticsManager statisticsManager);   }