### Question:
EPForwardingTemplateListenerImpl implements EPTemplateListener<EndpointForwardingTemplateBySubnet> { @Override public void close() throws Exception { LOG.debug("closing listener registration to {}", templatePath); listenerRegistration.close(); } EPForwardingTemplateListenerImpl(final DataBroker dataBroker,
                                            final SxpMapperReactor sxpMapperReactor,
                                            final SimpleCachedDao<IpPrefix, EndpointForwardingTemplateBySubnet> templateCachedDao,
                                            final DSAsyncDao<IpPrefix, MasterDatabaseBinding> masterDBBindingDao,
                                            final DSAsyncDao<Sgt, EndpointPolicyTemplateBySgt> epPolicyTemplateDao); @Override void onDataTreeChanged(@Nonnull final Collection<DataTreeModification<EndpointForwardingTemplateBySubnet>> collection); @Override void close(); static final FutureCallback<RpcResult<Void>> ANY_RPC_FUTURE_CALLBACK; }### Answer:
@Test public void testClose() throws Exception { Mockito.verify(listenerRegistration, Mockito.never()).close(); listener.close(); Mockito.verify(listenerRegistration).close(); }