@Test public void testProvideTemplate_noConfig() throws Exception { final ListenableFuture<Optional<EndpointPolicyTemplateBySgt>> endpointPolicyTemplateBySgt = templateProvider.provideTemplate(SGT); Assert.assertTrue(endpointPolicyTemplateBySgt.isDone()); Assert.assertFalse(endpointPolicyTemplateBySgt.get().isPresent()); }
@Override public ListenableFuture<Optional<EndpointPolicyTemplateBySgt>> provideTemplate(@Nonnull final Sgt sgt) { return findIseSourceConfigBySgt(sgt) .map(iseContext -> queryIseAndBuildTemplate(iseContext, sgt)) .orElse(Futures.immediateFuture(Optional.empty())); }
EPPolicyTemplateProviderIseImpl implements EPPolicyTemplateProviderFacade { @Override public ListenableFuture<Optional<EndpointPolicyTemplateBySgt>> provideTemplate(@Nonnull final Sgt sgt) { return findIseSourceConfigBySgt(sgt) .map(iseContext -> queryIseAndBuildTemplate(iseContext, sgt)) .orElse(Futures.immediateFuture(Optional.empty())); } }
EPPolicyTemplateProviderIseImpl implements EPPolicyTemplateProviderFacade { @Override public ListenableFuture<Optional<EndpointPolicyTemplateBySgt>> provideTemplate(@Nonnull final Sgt sgt) { return findIseSourceConfigBySgt(sgt) .map(iseContext -> queryIseAndBuildTemplate(iseContext, sgt)) .orElse(Futures.immediateFuture(Optional.empty())); }  }
EPPolicyTemplateProviderIseImpl implements EPPolicyTemplateProviderFacade { @Override public ListenableFuture<Optional<EndpointPolicyTemplateBySgt>> provideTemplate(@Nonnull final Sgt sgt) { return findIseSourceConfigBySgt(sgt) .map(iseContext -> queryIseAndBuildTemplate(iseContext, sgt)) .orElse(Futures.immediateFuture(Optional.empty())); }  @Override ListenableFuture<Optional<EndpointPolicyTemplateBySgt>> provideTemplate(@Nonnull final Sgt sgt); @Override void assignIseContext(final @Nullable IseContext iseContext); @Override void setIseSgtHarvester(final GbpIseSgtHarvester iseSgtHarvester); }
EPPolicyTemplateProviderIseImpl implements EPPolicyTemplateProviderFacade { @Override public ListenableFuture<Optional<EndpointPolicyTemplateBySgt>> provideTemplate(@Nonnull final Sgt sgt) { return findIseSourceConfigBySgt(sgt) .map(iseContext -> queryIseAndBuildTemplate(iseContext, sgt)) .orElse(Futures.immediateFuture(Optional.empty())); }  @Override ListenableFuture<Optional<EndpointPolicyTemplateBySgt>> provideTemplate(@Nonnull final Sgt sgt); @Override void assignIseContext(final @Nullable IseContext iseContext); @Override void setIseSgtHarvester(final GbpIseSgtHarvester iseSgtHarvester);  }