### Question:
EPPolicyTemplateProviderRegistryImpl implements EPPolicyTemplateProviderRegistry { @Override public void close() { distributeTemplateProvider(null); distributionTargets.clear(); }  @Override ObjectRegistration<EPPolicyTemplateProvider> registerTemplateProvider(final EPPolicyTemplateProvider templateProvider); @Override void addDistributionTarget(final TemplateProviderDistributionTarget<EPPolicyTemplateProvider> templateProviderDistributionTarget); @Override void close();  }### Answer:
@Test public void testClose() throws Exception { registry.addDistributionTarget(target1); final ObjectRegistration<EPPolicyTemplateProvider> registration = registry.registerTemplateProvider(templateProvider); registry.addDistributionTarget(target2); Mockito.verify(target1).setTemplateProvider(templateProvider); Mockito.verify(target2).setTemplateProvider(templateProvider); registry.close(); Mockito.verify(target1).setTemplateProvider(null); Mockito.verify(target2).setTemplateProvider(null); Mockito.verifyNoMoreInteractions(target1, target2); }