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