@Test public void uris_defined_inetadress_empty_when_install_setup_says_yes_for_both_target_types_the_product_executor_calls_the_adapter_parts_and_returns_data() throws Exception{ when(installSetup.isAbleToScan(TargetType.INTERNET)).thenReturn(true); when(installSetup.isAbleToScan(TargetType.INTRANET)).thenReturn(true); urisForTarget.add(URI_1); urisForTarget.add(URI_2); urisForTarget.add(URI_3); List<ProductResult> result = executorToTest.execute(context,executorContext); assertEquals(2,executorToTest.adapterExecutionCallAmount); assertNotNull(result); assertFalse(result.isEmpty()); assertEquals(2,result.size()); }
@Override public final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ) throws SecHubExecutionException { UUIDTraceLogID traceLogId = context.getTraceLogId(); LOG.debug("Executing {}", traceLogId); SecHubConfiguration config = context.getConfiguration(); S setup = getInstallSetup(); TargetRegistry registry = createTargetRegistry(); List<URI> uris = resolveURIsForTarget(config); registerURIs(traceLogId, setup, registry, uris); List<InetAddress> inetAdresses = resolveInetAdressForTarget(config); registerInetAdresses(traceLogId, setup, registry, inetAdresses); customRegistration(traceLogId, setup, registry, config); try { return execute(context, executorContext, registry, setup); } catch (SecHubExecutionException e) { throw e; } catch (Exception e) { throw new SecHubExecutionException(getIdentifier() + " execution failed." + traceLogId, e); } }
AbstractInstallSetupProductExecutor implements ProductExecutor { @Override public final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ) throws SecHubExecutionException { UUIDTraceLogID traceLogId = context.getTraceLogId(); LOG.debug("Executing {}", traceLogId); SecHubConfiguration config = context.getConfiguration(); S setup = getInstallSetup(); TargetRegistry registry = createTargetRegistry(); List<URI> uris = resolveURIsForTarget(config); registerURIs(traceLogId, setup, registry, uris); List<InetAddress> inetAdresses = resolveInetAdressForTarget(config); registerInetAdresses(traceLogId, setup, registry, inetAdresses); customRegistration(traceLogId, setup, registry, config); try { return execute(context, executorContext, registry, setup); } catch (SecHubExecutionException e) { throw e; } catch (Exception e) { throw new SecHubExecutionException(getIdentifier() + " execution failed." + traceLogId, e); } } }
AbstractInstallSetupProductExecutor implements ProductExecutor { @Override public final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ) throws SecHubExecutionException { UUIDTraceLogID traceLogId = context.getTraceLogId(); LOG.debug("Executing {}", traceLogId); SecHubConfiguration config = context.getConfiguration(); S setup = getInstallSetup(); TargetRegistry registry = createTargetRegistry(); List<URI> uris = resolveURIsForTarget(config); registerURIs(traceLogId, setup, registry, uris); List<InetAddress> inetAdresses = resolveInetAdressForTarget(config); registerInetAdresses(traceLogId, setup, registry, inetAdresses); customRegistration(traceLogId, setup, registry, config); try { return execute(context, executorContext, registry, setup); } catch (SecHubExecutionException e) { throw e; } catch (Exception e) { throw new SecHubExecutionException(getIdentifier() + " execution failed." + traceLogId, e); } }  }
AbstractInstallSetupProductExecutor implements ProductExecutor { @Override public final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ) throws SecHubExecutionException { UUIDTraceLogID traceLogId = context.getTraceLogId(); LOG.debug("Executing {}", traceLogId); SecHubConfiguration config = context.getConfiguration(); S setup = getInstallSetup(); TargetRegistry registry = createTargetRegistry(); List<URI> uris = resolveURIsForTarget(config); registerURIs(traceLogId, setup, registry, uris); List<InetAddress> inetAdresses = resolveInetAdressForTarget(config); registerInetAdresses(traceLogId, setup, registry, inetAdresses); customRegistration(traceLogId, setup, registry, config); try { return execute(context, executorContext, registry, setup); } catch (SecHubExecutionException e) { throw e; } catch (Exception e) { throw new SecHubExecutionException(getIdentifier() + " execution failed." + traceLogId, e); } }  @Override final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ); }
AbstractInstallSetupProductExecutor implements ProductExecutor { @Override public final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ) throws SecHubExecutionException { UUIDTraceLogID traceLogId = context.getTraceLogId(); LOG.debug("Executing {}", traceLogId); SecHubConfiguration config = context.getConfiguration(); S setup = getInstallSetup(); TargetRegistry registry = createTargetRegistry(); List<URI> uris = resolveURIsForTarget(config); registerURIs(traceLogId, setup, registry, uris); List<InetAddress> inetAdresses = resolveInetAdressForTarget(config); registerInetAdresses(traceLogId, setup, registry, inetAdresses); customRegistration(traceLogId, setup, registry, config); try { return execute(context, executorContext, registry, setup); } catch (SecHubExecutionException e) { throw e; } catch (Exception e) { throw new SecHubExecutionException(getIdentifier() + " execution failed." + traceLogId, e); } }  @Override final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext );  }