### Question:
EPPolicyTemplateProviderRegistryImpl implements EPPolicyTemplateProviderRegistry { @Override public void addDistributionTarget(final TemplateProviderDistributionTarget<EPPolicyTemplateProvider> templateProviderDistributionTarget) { distributionTargets.add(templateProviderDistributionTarget); if (templateProvider != null) { templateProviderDistributionTarget.setTemplateProvider(templateProvider); } }  @Override ObjectRegistration<EPPolicyTemplateProvider> registerTemplateProvider(final EPPolicyTemplateProvider templateProvider); @Override void addDistributionTarget(final TemplateProviderDistributionTarget<EPPolicyTemplateProvider> templateProviderDistributionTarget); @Override void close();  }### Answer:
@Test public void testAddDistributionTarget() throws Exception { registry.addDistributionTarget(target1); Mockito.verify(target1, Mockito.never()).setTemplateProvider(Matchers.<EPPolicyTemplateProvider>any()); registry.registerTemplateProvider(templateProvider); Mockito.verify(target1).setTemplateProvider(templateProvider); registry.addDistributionTarget(target2); Mockito.verify(target2).setTemplateProvider(templateProvider); }